Yes
N/A
test, tests, ci, jest
Noticed on CI server but also happening locally.
using react-scripts v2
yarn test from project without tests.Shouldn't exit code 0 or have a flag to enable/disable the behavior
Exited code 1
❯ cross-env CI=true yarn test --ci
yarn run v1.9.4
$ react-scripts test --ci
No tests found
In /Users/stramel/Projects/my-package
9 files checked.
testMatch: /Users/stramel/Projects/my-package/src/**/__tests__/**/*.{js,jsx},/Users/stramel/Projects/my-package/src/**/?(*.)(spec|test).{js,jsx} - 0 matches
testPathIgnorePatterns: /node_modules/ - 9 matches
Pattern: - 0 matches
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This was an intentional change made in Jest. You can add add a flag to turn this behavior off, i.e.:
{
"scripts": {
"test": "react-scripts test --passWithNoTests"
}
}
Thanks @Timer! Sorry didn't see any documentation about how to bypass it.
Most helpful comment
This was an intentional change made in Jest. You can add add a flag to turn this behavior off, i.e.: