Unit tests are not executed
See original GitHub issueIs this a bug report?
Yes
Can you also reproduce the problem with npm 4.x?
I am using latest yarn 0.27.5
and npm 5.2.0
on Windows.
Environment
- Node 8.1.3
- Yarn 0.27.5 or NPM 5.2.0
- react-scripts@1.0.1
- Windows
Steps to Reproduce
-
Run
yarn test
ornpm test
(is running scriptreact-scripts test --env=jsdom
) -
It says: “Determining test suites to run…” -> “Press a to run all tests.”
-
After hitting
a
-
You see:
No tests found
In C:\PROJECT
18490 files checked.
testMatch: C:\PROJECT\src\**\__tests__\**\*.js?(x),C:\PROJECT\src\**\?(*.)(spec|test).js?(x) - 6 matches
testPathIgnorePatterns: \\node_modules\\ - 18490 matches
Pattern: "" - 0 matches
No tests were executed but there are tests inside in PROJECT/src/ eg. default App.test.js - these tests are being executed when saving changes while in jest watch mode.
Expected Behavior
All tests inside src/**/*.test.js
should be executed
Note (Temporary workaround)
Using Windows 10 bash (ubuntu) it’s running fine, so looks like it affects only Windows (tested on both - Win 7 & 10)
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Tests not running in Test Explorer - visual studio
However, the tests are not running when using the Visual Studio test explorer. The Test Explorer is showing all unit tests, but once...
Read more >NUnit tests are not executed in Test Explorer
Trying to run each of them, or running all results in all of them appearing "greyed out" and nothing is being executed. Not...
Read more >How To Resolve Issue Of Test Project Not Running The Unit ...
Two of my test projects didn't run the test cases, it was about to start and took some time to run the test...
Read more >Tests not running in Visual Studio - Developers Log
Test are showing in the Visual Studio test explorer window, but they are not running: how to solve this issue.
Read more >Visual Studio 2019: MSTest unit tests are not running in Test ...
Right-click on your test project · Click Manage Nuget Packages… · Browse > search for MSTest.TestAdapter > click on MSTest.TestAdapter in the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems like this is fixed on Jest 22 so I’ll close. We’ll update to it soon.
As a temporary workaround you can run your tests with
--no-watchman
, i.e.npm test -- --no-watchman
.Hi, I solved this issue by removing the locally installed watchman path variable. When running jest --verbose I got “@providesModule naming collision” warnings as reported in issue. After removing the variable, jest is matching and executing all tests again. Maybe this workaround helps some of you. My system is running: