Skip to content

Commit

Permalink
Add npm run jest script to package.json
Browse files Browse the repository at this point in the history
Summary:This makes it easier to just run a jest test and skip the flow type checking.

```
npm run jest MyTest
```
Closes #992

Reviewed By: yungsters

Differential Revision: D3098333

Pulled By: kassens

fb-gh-sync-id: aee04c1764e75eb7c9a96a074301e627551a5f49
fbshipit-source-id: aee04c1764e75eb7c9a96a074301e627551a5f49
  • Loading branch information
kassens authored and Facebook Github Bot 6 committed Mar 25, 2016
1 parent cc6a86c commit 8c386dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
"repository": "facebook/relay",
"scripts": {
"build": "gulp",
"jest": "NODE_ENV=test jest $@",
"lint": "eslint .",
"prepublish": "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json && npm run build",
"test": "f() { EXIT=0; npm run typecheck || EXIT=$?; NODE_ENV=test jest $@ || EXIT=$?; exit $EXIT; }; f",
"test": "f() { EXIT=0; npm run typecheck || EXIT=$?; npm run jest || EXIT=$?; exit $EXIT; }; f",
"typecheck": "flow check src/",
"update-schema": "babel-node ./scripts/jest/updateSchema.js"
},
Expand Down
7 changes: 4 additions & 3 deletions scripts/babel-relay-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
"main": "lib/getBabelRelayPlugin.js",
"scripts": {
"build": "node scripts/build-lib",
"jest": "NODE_ENV=test jest $@",
"lint": "eslint .",
"prepublish": "npm run build",
"test": "f() { EXIT=0; npm run typecheck || EXIT=$?; NODE_ENV=test jest $@ || EXIT=$?; exit $EXIT; }; f",
"test": "f() { EXIT=0; npm run typecheck || EXIT=$?; npm run jest || EXIT=$?; exit $EXIT; }; f",
"typecheck": "flow check src/",
"update-schema": "babel-node ./src/tools/generateSchemaJson.js",
"update-fixtures": "babel-node ./src/tools/regenerateFixtures.js"
"update-fixtures": "babel-node ./src/tools/regenerateFixtures.js",
"update-schema": "babel-node ./src/tools/generateSchemaJson.js"
},
"files": [
"LICENSE",
Expand Down

0 comments on commit 8c386dc

Please sign in to comment.