add test coverage reporting

via nyc. also change non-build test runner script name
This commit is contained in:
2016-05-03 14:20:34 -07:00
parent ed7322b0d7
commit 594e249ee0
3 changed files with 5 additions and 2 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
lib lib
node_modules node_modules
npm-debug.log npm-debug.log
.nyc_output

View File

@@ -1,3 +1,4 @@
src src
test test
.travis.yml .travis.yml
.nyc_output

View File

@@ -4,8 +4,8 @@
"description": "", "description": "",
"main": "lib/index.js", "main": "lib/index.js",
"scripts": { "scripts": {
"test": "npm run build && npm run mocha", "test": "npm run build && npm run unit",
"mocha": "mocha --compilers js:babel-core/register test/src/**", "unit": "nyc --require babel-core/register mocha test/src/**",
"build": "babel src --out-dir lib", "build": "babel src --out-dir lib",
"prepublish": "in-publish && npm run test || not-in-publish" "prepublish": "in-publish && npm run test || not-in-publish"
}, },
@@ -26,6 +26,7 @@
"eslint-plugin-react": "~4.2.3", "eslint-plugin-react": "~4.2.3",
"expect.js": "~0.3.1", "expect.js": "~0.3.1",
"mocha": "~2.4.5", "mocha": "~2.4.5",
"nyc": "~6.4.2",
"proxyquire": "~1.7.4", "proxyquire": "~1.7.4",
"sinon": "~1.17.3" "sinon": "~1.17.3"
}, },