diff options
author | 2023-05-24 02:09:21 -0700 | |
---|---|---|
committer | 2023-05-24 02:09:21 -0700 | |
commit | 2dcf948934e9293fc39243217a3a568f235421f0 (patch) | |
tree | be568c8cefc09d06b37c853233ed07e805502360 /src/cli.zig | |
parent | c968fc447eaeaf6665a9cd3aa9077c58702944a4 (diff) | |
download | bun-jarred/isolation.tar.gz bun-jarred/isolation.tar.zst bun-jarred/isolation.zip |
[bun:test] Implement `--isolate` flag (first pass at this)jarred/isolation
Diffstat (limited to 'src/cli.zig')
-rw-r--r-- | src/cli.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cli.zig b/src/cli.zig index 606e0a3cc..d808a2209 100644 --- a/src/cli.zig +++ b/src/cli.zig @@ -211,6 +211,7 @@ pub const Arguments = struct { // TODO: update test completions const test_only_params = [_]ParamType{ + clap.parseParam("--isolate Create a new global for each test file") catch unreachable, clap.parseParam("--timeout <NUMBER> Set the per-test timeout in milliseconds, default is 5000.") catch unreachable, clap.parseParam("--update-snapshots Update snapshot files") catch unreachable, clap.parseParam("--rerun-each <NUMBER> Re-run each test file <NUMBER> times, helps catch certain bugs") catch unreachable, @@ -380,6 +381,8 @@ pub const Arguments = struct { }; } } + + ctx.test_options.isolate = args.flag("--isolate"); ctx.test_options.update_snapshots = args.flag("--update-snapshots"); if (args.option("--rerun-each")) |repeat_count| { if (repeat_count.len > 0) { @@ -916,6 +919,7 @@ pub const Command = struct { default_timeout_ms: u32 = 5 * std.time.ms_per_s, update_snapshots: bool = false, repeat_count: u32 = 0, + isolate: bool = false, }; pub const Context = struct { |