diff options
author | 2023-10-16 20:01:24 -0700 | |
---|---|---|
committer | 2023-10-16 20:01:24 -0700 | |
commit | a3958190e8f106adca7fbf4ba2605056cb22aced (patch) | |
tree | 475057061d3470f1dc4d06b901d6bad0b898cb09 /src/bun.js/test/jest.zig | |
parent | 6504bfef74b552aa834324adfe102c9ba0193039 (diff) | |
download | bun-a3958190e8f106adca7fbf4ba2605056cb22aced.tar.gz bun-a3958190e8f106adca7fbf4ba2605056cb22aced.tar.zst bun-a3958190e8f106adca7fbf4ba2605056cb22aced.zip |
fix(runtime): improve IPC reliability + organization pass on that code (#6475)
* dfghj
* Handle messages that did not finish
* tidy
* ok
* a
* Merge remote-tracking branch 'origin/main' into dave/ipc-fixes
* test failures
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Diffstat (limited to 'src/bun.js/test/jest.zig')
-rw-r--r-- | src/bun.js/test/jest.zig | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/bun.js/test/jest.zig b/src/bun.js/test/jest.zig index 283f369ff..5490b3472 100644 --- a/src/bun.js/test/jest.zig +++ b/src/bun.js/test/jest.zig @@ -808,9 +808,17 @@ pub const DescribeScope = struct { return false; } + fn isWithinTodoScope(this: *const DescribeScope) bool { + if (this.tag == .todo) return true; + if (this.parent != null) return this.parent.?.isWithinTodoScope(); + return false; + } + pub fn shouldEvaluateScope(this: *const DescribeScope) bool { - if (this.isWithinSkipScope()) return false; - if (Jest.runner.?.only and this.isWithinOnlyScope()) return true; + if (this.tag == .skip or + this.tag == .todo) return false; + if (Jest.runner.?.only and this.tag == .only) return true; + if (this.parent != null) return this.parent.?.shouldEvaluateScope(); return true; } |