No tests found - exit code 1
See original GitHub issueCurrent Behavior
After installing tsdx globally and creating a new project I ran npm test
and it prompts the following to console:
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\dev\hidash
13 files checked.
testMatch: C:/dev/hidash/test/**\?(*.)(spec|test).{ts,tsx} - 0 matches
testPathIgnorePatterns: \\node_modules\\ - 13 matches
testRegex: - 0 matches
Pattern: - 0 matches
Also when filtering for blah.test.ts
manually it won’t show up.
Expected behavior
To get the default test to run and pass after installing out of the box.
Your environment
Software | Version(s) |
---|---|
TSDX | 0.5.4 |
TypeScript | as bundled |
Browser | (not involved) |
npm | 6.7.0 |
Operating System | Windows 10 |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Jest "No tests found, exiting with code 1" error on Windows 10 ...
No tests found, exiting with code 1 Run with `--passWithNoTests` to exit with code 0 In C:\Users\myUsername\Documents\myApp 47 files checked ...
Read more >Tests exiting code 1 when no tests are found #5283 - GitHub
Run yarn test from project without tests. Expected Behavior. Shouldn't exit code 0 or have a flag to enable/disable the behavior. Actual ...
Read more >Jest — Filenames without test or spec | by Damian Myerscough
No tests found, exiting with code 1. Run with `--passWithNoTests` to exit with code 0. In /Users/damianmyerscough/project1 4 files checked.
Read more >Jest "No tests found, exiting with code 1" error on Windows 10 ...
Coding example for the question Jest "No tests found, exiting with code 1" error on Windows 10 in React Redux application-Reactjs.
Read more >wrong test pattern when running single Jest test, 'no tests found'
wrong test pattern when running single Jest test, 'no tests found' ... Is duplicated by 1 issue (0 unresolved) ... Process finished with...
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
Also I’d prefer the default behaviour to become
--watchAll
again as it wasn’t the cause of this bug if you agreeI created the PR above. Someone should verify it still works on MacOS. Not sure why the other solution didn’t work but this one does and should do the same thing.