codeflash/packages
ali 2e77f85834
fix: resolve jest-runner from project's node_modules for Jest 30 compatibility
The loop-runner was loading jest-runner from codeflash's node_modules (v29)
instead of the project's (v30), causing "runtime.enterTestCode is not a function"
errors. This fix:

- Adds recursive search to find jest-runner in any node_modules structure
- Works with npm, yarn, and pnpm (including non-hoisted deps)
- Prefers higher versions when multiple are found
- Removes internal looping in capturePerf when using external loop-runner
- Creates fresh TestRunner per batch to avoid Jest 30 state corruption

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 14:31:08 +02:00
..
codeflash fix: resolve jest-runner from project's node_modules for Jest 30 compatibility 2026-02-16 14:31:08 +02:00