mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
Add error when running jest directly (#12726)
```
$ jest
FAIL scripts/jest/dont-run-jest-directly.js
● Test suite failed to run
Don't run `jest` directly. Run `yarn test` instead.
> 1 | throw new Error("Don't run `jest` directly. Run `yarn test` instead.");
2 |
at Object.<anonymous> (scripts/jest/dont-run-jest-directly.js:1:96)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 0.866s
Ran all test suites.
```
This commit is contained in:
parent
e0ca51a85d
commit
200357596a
|
|
@ -103,6 +103,9 @@
|
|||
"devEngines": {
|
||||
"node": "8.x || 9.x"
|
||||
},
|
||||
"jest": {
|
||||
"testRegex": "/scripts/jest/dont-run-jest-directly\\.js$"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run version-check && node ./scripts/rollup/build.js",
|
||||
"flow-coverage": "flow-coverage-report --config ./.flowcoverage",
|
||||
|
|
|
|||
3
scripts/jest/dont-run-jest-directly.js
Normal file
3
scripts/jest/dont-run-jest-directly.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
'use strict';
|
||||
|
||||
throw new Error("Don't run `jest` directly. Run `yarn test` instead.");
|
||||
Loading…
Reference in New Issue
Block a user