Jest 26.2.1 regression: “No tests found” on Windows
See original GitHub issue🐛 Bug Report
In PostCSS we found a problem with the new Jest release. After updating Jest to 26.2.1, Jest stopped to see tests on Windows in our Travis CI.
$ npx jest
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
No files found in C:\Users\travis\build\postcss\postcss.
Make sure Jest's configuration does not exclude this directory.
To set up Jest, make sure a package.json file exists.
Jest Documentation: facebook.github.io/jest/docs/configuration.html
Pattern: - 0 matches
The command "npx jest" exited with 1.
- Update commit: https://github.com/postcss/postcss/commit/8722140c5c55530b0c4091190f1557b42fd18c87
- Before: https://travis-ci.org/github/postcss/postcss/jobs/713424784
- After: https://travis-ci.org/github/postcss/postcss/jobs/713426131
To Reproduce
Seems like just call npx jest
on Windows. Here is a config to call it on Travis CI
matrix:
include:
os: windows
cache: false
node_js: node
script: npx jest
env:
- YARN_GPG=no
Expected behavior
https://travis-ci.org/github/postcss/postcss/jobs/713424784
Link to repl or repo (highly encouraged)
https://github.com/postcss/postcss/archive/8722140c5c55530b0c4091190f1557b42fd18c87.zip
envinfo
System:
OS: Windows 10 10.0.17763
CPU: (2) x64 Intel(R) Xeon(R) CPU
Binaries:
Node: 14.7.0 - C:\ProgramData\nvs\node\14.7.0\x64\node.EXE
Yarn: 1.22.4 - ~\.yarn\bin\yarn.CMD
npm: 6.14.7 - C:\ProgramData\nvs\node\14.7.0\x64\npm.CMD
npmPackages:
jest: ^26.2.1 => 26.2.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:23 (7 by maintainers)
Top Results From Across the Web
Source - GitHub
jest 17.0.2 - Fixed performance regression in module resolution. ... Added a "no tests found" message if no tests can be found. -...
Read more >Jest No Tests Found - FaqCode24.com
No tests found In /usr/src/app says that Jest is looking for tests in /usr/src/app ... Jest 26.2.1 regression: “No tests found” on Windows...
Read more >jest - Jest 26.2.1回归:Windows上“未找到测试” | bleepcoder.com
$ npx jest No tests found, exiting with code 1 Run with `--passWithNoTests` to exit with code 0 No files found in C:\Users\travis\build\postcss\postcss....
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
https://github.com/facebook/jest/releases/tag/v26.2.2
Tests not being detected on WIndows. I use yarn, ts-jest for typescript.
Do we have an interim solution for windows? Version is automatically being pointed to 26.2.1 even thought i explicitly mention ~26.1.0