Eureka/tools/fixtures/mutation-mock/jtest.sh
Meta Vens f68bd4099f testparse: jest names come only from "●" lines under a FAIL header; real jest fixtures
Jest without a TTY prints "FAIL jt/add.test.js" with one space; the parser
matched two, so a real jest load failure read ERROR, not UNVIABLE. The old
`^ +● ` denylist also named process.exit's "●  process.exit called with "1""
as a killing test (CAUGHT). Names now need a FAIL file header above them; a
crash with no named failing test is ERROR. The "no test counts recognised"
line names jest. The synthetic jest logs and mock are replaced by real jest
29.7.0 output captured on Yggdrasil from tools/fixtures/mutation-probe/jsr
(green, wrong, load, exit runs in logs/jest-real.log).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-01 18:14:45 +02:00

9 lines
466 B
Shell

# Mock jest run: prints a segment of jest-real.log (a real jest 29.7.0 run, see tools/fixtures/logs/jest-real.log)
# picked by what add.js says. BROKEN: a module that does not load; WRONG: an assertion failure; EXIT: a test run
# that calls process.exit(1); otherwise green.
m=green
grep -q BROKEN add.js && m=load
grep -q WRONG add.js && m=wrong
grep -q EXIT add.js && m=exit
awk -v m="=== MARK $m" '/^=== MARK /{on=($0==m);next} on' jest-real.log
[ "$m" = green ]