Jest won't run a specific test spec file from CLI
See original GitHub issueDo you want to request a feature or report a bug? Bug report What is the current behavior? When I run all my test spec files together jest runs them all. But when I want to run a single spec file using ‘jest path/to/my-test.js’ I get the following error:
No tests found in C:\Users\User\Documents\folder12 files checked. testMatch: **/__tests__/**/*.js?(x),**/?(*.)(spec|test).js?(x) - 4 matches testPathIgnorePatterns: \\node_modules\\ - 12 matchesPattern: .\_tests_\API\tickers.spec.jS - 0 matches error An unexpected error occurred: "Command failed.Exit code: 1
Code structure: tests API tickers.spec.js
What is the expected behavior? tickers.spec.js should run
Run npx envinfo --preset jest
in your project directory and paste the
results here
System:
OS: Windows 10
CPU: x64 Intel® Core™ i7-5600U CPU @ 2.60GHz Binaries: Yarn: 1.5.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top GitHub Comments
Wonder if this PR https://github.com/facebook/jest/pull/5941 fixes it? You should be able to try this using
jest@beta
Seeing as you’re on windows, have you tried
jest path\to\my-test.js
?