You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When jest runs but there are no tests to execute, by default it exits with code 1 (error) and prints the following message
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In /path/to/my/project
1 file checked.
testMatch: **/__tests__/**/*.[jt]s?(x), **/?(*.)+(spec|test).[tj]s?(x) - 0 matches
testPathIgnorePatterns: /node_modules/ - 1 match
testRegex: - 0 matches
Pattern: - 0 matches
When running with --passWithNoTests, jest exits with code 0 but the same message gets printed.
Expected behaviour
Jest does not print warning when ran with --passWithNoTests
Actual behaviour
Jest prints warning when ran with --passWithNoTests
To Reproduce
In an empty directory:
yarn add jest
Add "test": "jest --passWithNoTests" to scripts in package.json
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
When jest runs but there are no tests to execute, by default it exits with code 1 (error) and prints the following message
When running with
--passWithNoTests
, jest exits with code 0 but the same message gets printed.Expected behaviour
Jest does not print warning when ran with
--passWithNoTests
Actual behaviour
Jest prints warning when ran with
--passWithNoTests
To Reproduce
In an empty directory:
yarn add jest
"test": "jest --passWithNoTests"
to scripts in package.jsonyarn test
Link to reproducible repo
kaykayehnn/jest-pass-with-no-tests-bug
Environment
I can submit a PR for this if that's okay.
The text was updated successfully, but these errors were encountered: