Skip to content

Commit

Permalink
Implement NPM scripts for multiple test tasks
Browse files Browse the repository at this point in the history
This commit adds new NPM scripts to allow to run all tests with various
options:

- `test` - Run all tests with Jest.
- `test:cov` - Run all tests with coverage reports (1).
- `test:watch` - Run all tests in Jest's "watch mode" (2).

References:
  (1) https://jestjs.io/docs/en/cli#coverage
  (2) https://jestjs.io/docs/en/cli#watch

GH-39
  • Loading branch information
arcticicestudio committed Nov 24, 2018
1 parent 405c46b commit dba8c65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@
"lint": "npm-run-all lint:*",
"lint:js": "eslint --ext .js,.jsx .",
"lint:md": "remark --no-stdout . \".github/**/*.md\"",
"serve": "gatsby serve"
"serve": "gatsby serve",
"test": "jest",
"test:cov": "jest --coverage",
"test:watch": "jest --watch"
},
"devDependencies": {
"@babel/core": "7.1.6",
Expand Down

0 comments on commit dba8c65

Please sign in to comment.