test: allow onTestFinished() and expect.assertions() in concurrent tests #29238
+273
−29
Claude / Claude Code Review
completed
Apr 12, 2026 in 31m 33s
Code review found 2 potential issues
Found 5 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 0 |
| 🟡 Nit | 1 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🟡 Nit | src/bun.js/test/Execution.zig:397-412 |
toMatchSnapshot() silently unblocked in concurrent tests; test.failing fixture marker now stale |
Annotations
Check warning on line 412 in src/bun.js/test/Execution.zig
claude / Claude Code Review
toMatchSnapshot() silently unblocked in concurrent tests; test.failing fixture marker now stale
The `pushCurrentCallback` mechanism inadvertently lifts the `SnapshotInConcurrentGroup` restriction for synchronous calls inside concurrent tests, making the `test.failing('snapshot in concurrent group')` fixture stale. The fixture now passes by coincidence (via `SnapshotCreationNotAllowedInCI` in CI) rather than by the original guard, meaning the behavioral change is silently masked. Running `bun_test.fixture.ts` directly in a non-CI environment (without `CI=1`) will cause `toMatchSnapshot()` t
Loading