[test optimization] Prevent Jest --bail from stopping on quarantined test failures#8015
Conversation
Overall package sizeSelf size: 5.5 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8015 +/- ##
==========================================
- Coverage 73.83% 73.59% -0.24%
==========================================
Files 773 773
Lines 35983 36083 +100
==========================================
- Hits 26567 26557 -10
- Misses 9416 9526 +110
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
✨ Fix all issues with BitsAI or with Cursor
|
BenchmarksBenchmark execution time: 2026-04-16 09:45:07 Comparing candidate commit d844bdd in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 233 metrics, 27 unstable metrics. |
3bccbc2 to
d0e5aa8
Compare
…est --bail from stopping execution Quarantined test failures left `event.test.errors` intact, so Jest's --bail flag would stop the run on the first quarantined failure. This suppresses errors for quarantined tests at test_done time (after capturing status for dd-trace reporting) so Jest doesn't see the failure. Errors are only suppressed on the final execution to avoid interfering with ATR retries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
d0e5aa8 to
d844bdd
Compare
…--bail from stopping execution (#8015)
…--bail from stopping execution (#8015)
What does this PR do?
Suppresses
event.test.errorsfor quarantined tests attest_donetime so Jest doesn't count them as failures. This prevents--bailfrom stopping the test run when only quarantined tests fail.Errors are only suppressed on the final execution to avoid interfering with ATR/ATF retries. For ATF/EFD tests (which use
atrSuppressedErrors), errors are skipped during restoration atrun_finishif the test is quarantined.Quarantine suppression info is sent from workers to the main process via IPC (new payload code
JEST_WORKER_QUARANTINE_PAYLOAD_CODE) so the session summary remains accurate in parallel mode.Motivation
Jest's
--bailflag stops execution on the first test failure. Quarantined tests that fail leftevent.test.errorsintact, so bail would trigger even though the failure was expected to be ignored. The exit code flip at session level happened too late to prevent this.