question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No tests found - exit code 1

See original GitHub issue

Current 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
bastibuckcommented, May 1, 2019

Also I’d prefer the default behaviour to become --watchAll again as it wasn’t the cause of this bug if you agree

1reaction
bastibuckcommented, May 1, 2019

I 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found