You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
git clone [email protected]:nicojs/jest-find-related-test-bug.git
cd jest-find-related-test-bug/.hidden
npm i
npx jest --findRelatedTests src/sum.js
Expected behavior
PASS src/sum.test.js
√ adds 1 + 2 to equal 3 (2ms)
√ sub 1 - 0 to equal 1
Test Suites: 1 passed, 1 total
Tests: 2 passed, 2 total
Snapshots: 0 total
Time: 3.381s
Ran all test suites related to files matching /src\\sum.js/i.
But was:
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\z\github\nicojs\jest-find-related-test-bug\.hidden
4 files checked.
testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 1 match
testPathIgnorePatterns: \\node_modules\\ - 4 matches
testRegex: - 0 matches
Pattern: src\\sum.js - 0 matches
This behavior broke with jest@25. I.e. this works:
npm i jest@24
npx jest --findRelatedTests src/sum.js
Moving the code to a non-hidden directory also works:
cd ..
mv .hidden hidden
cd hidden
npx jest --findRelatedTests src/sum.js
Or Linux also seems to work (tested with Windows Subsystem for Linux).
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
Since v25,
--findRelatedTests
no longer works on Windows when running in a hidden directory (a directory starting with a.
).To Reproduce
A really small reproduction repo can be found here: https://github.com/nicojs/jest-find-related-test-bug
On windows:
Expected behavior
But was:
This behavior broke with jest@25. I.e. this works:
Moving the code to a non-hidden directory also works:
Or Linux also seems to work (tested with Windows Subsystem for Linux).
Link to repl or repo (highly encouraged)
https://github.com/nicojs/jest-find-related-test-bug
envinfo
The text was updated successfully, but these errors were encountered: