Support coverage with instabul and nyc
This commit is contained in:
parent
42a7c8c91d
commit
350da71b41
11
.babelrc
11
.babelrc
@ -1,4 +1,11 @@
|
||||
{
|
||||
"presets": ["env"],
|
||||
"plugins": ["babel-plugin-add-module-exports"]
|
||||
}
|
||||
"plugins": ["babel-plugin-add-module-exports"],
|
||||
"env": {
|
||||
"test": {
|
||||
"plugins": [
|
||||
["istanbul"]
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,6 +12,7 @@ lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
lib/webpack-library-starter.min.js
vendored
4
lib/webpack-library-starter.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
10498
package-lock.json
generated
10498
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
@ -7,7 +7,8 @@
|
||||
"build": "webpack --env dev && webpack --env build && npm run test",
|
||||
"dev": "webpack --progress --colors --watch --env dev",
|
||||
"test": "mocha --require babel-register --colors ./test/*.spec.js",
|
||||
"test:watch": "mocha --require babel-register --colors -w ./test/*.spec.js"
|
||||
"test:watch": "mocha --require babel-register --colors -w ./test/*.spec.js",
|
||||
"test:cover": "cross-env NODE_ENV=test nyc mocha --require babel-register --colors test/*.js"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -35,9 +36,11 @@
|
||||
"babel-eslint": "^8.0.3",
|
||||
"babel-loader": "^8.0.0-beta.4",
|
||||
"babel-plugin-add-module-exports": "^0.2.1",
|
||||
"babel-plugin-istanbul": "^5.1.0",
|
||||
"babel-preset-env": "^7.0.0-beta.3",
|
||||
"babel-register": "^7.0.0-beta.3",
|
||||
"chai": "^4.1.2",
|
||||
"cross-env": "^5.2.0",
|
||||
"eslint": "^5.0.1",
|
||||
"eslint-loader": "^2.0.0",
|
||||
"jsdom": "11.11.0",
|
||||
@ -47,5 +50,12 @@
|
||||
"webpack": "^4.12.2",
|
||||
"webpack-cli": "^3.0.8",
|
||||
"yargs": "^10.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"nyc": "^13.1.0"
|
||||
},
|
||||
"nyc": {
|
||||
"sourceMap": false,
|
||||
"instrument": false
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ if (env === 'build') {
|
||||
const config = {
|
||||
mode: mode,
|
||||
entry: __dirname + '/src/index.js',
|
||||
devtool: 'source-map',
|
||||
devtool: 'inline-source-map',
|
||||
output: {
|
||||
path: __dirname + '/lib',
|
||||
filename: outputFile,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user