Skip to content

Commit

Permalink
Use mocha.opts to share config and get correct coverage (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
JaKXz authored and Kent C. Dodds committed Jul 15, 2016
1 parent 4ee821b commit 1aa6d1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
"description": "Simple React example app",
"main": "index.js",
"scripts": {
"test:base": "mocha app/**/*.test.js --require ./test/helpers/setup.js",
"test": "npm run test:base -- --compilers js:babel-register",
"watch:test": "npm test -- -w",
"cover": "cross-env NODE_ENV=test nyc npm run test:base",
"test": "cross-env NODE_ENV=test nyc mocha",
"watch:test": "mocha -w",
"build": "webpack --env.production",
"start": "webpack-dev-server --inline --content-base ./ --env.dev"
},
Expand Down
3 changes: 3 additions & 0 deletions test/mocha.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--compilers js:babel-register
--require ./test/helpers/setup.js
app/**/*.test.js

0 comments on commit 1aa6d1d

Please sign in to comment.