Skip to content

Commit 87e357a

Browse files
author
zzzgit
committed
nyc
1 parent 71b1aa9 commit 87e357a

File tree

7 files changed

+11
-43
lines changed

7 files changed

+11
-43
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ dist/
55
built/
66
/.idea
77
coverage/
8+
.nyc_output/

a.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

abc.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

karma.conf.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@ module.exports = function (config) {
1313
'karma-webpack',
1414
'karma-babel-preprocessor',
1515
'karma-coverage',
16+
'karma-mocha-reporter'
1617
],
1718
preprocessors: {
1819
'./test/*.js': ['webpack'],
19-
// './built/*.js': ['coverage'],
20-
// './src/*.js': ['coverage'],
20+
'./built/*.js': ['coverage'],
21+
'./src/*.js': ['coverage'],
2122
},
2223
coverageReporter: {
23-
type: 'html',
24-
dir: 'coverage/'
24+
type: 'text',
25+
//dir: 'coverage/'
2526
},
2627
// possible values: 'dots', 'progress'
2728
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
28-
reporters: ['progress', 'coverage'],
29+
reporters: ['dots', 'coverage'],
2930
webpackMiddleware: {
3031
noInfo: true
3132
},
@@ -41,8 +42,8 @@ module.exports = function (config) {
4142

4243
browsers: [
4344
//'Chrome',
44-
'Firefox',
45-
//'IE',
45+
//'Firefox',
46+
'IE',
4647
//'PhantomJS',
4748
//'Edge',
4849
],

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
"description": "a validation lib",
55
"main": "index.js",
66
"scripts": {
7-
"clear": "rimraf built coverage",
7+
"clear": "rimraf built coverage .nyc_output",
88
"build": "npm run clear && cross-env NODE_ENV=production rollup -c",
9-
"test": "npm run build && mocha --colors --reporter progress ./test/test.js",
9+
"test": "npm run build && nyc mocha --colors --reporter dot ./test/test.js",
1010
"karma": "npm run build && karma start",
1111
"push": "git add ./ && git commit && git pull && git push",
1212
"deploy": "npm run build && npm run push && npm publish",
13-
"a": "nyc ./a.js",
14-
"cover": "istanbul cover _mocha test/test.sqrt.js",
1513
"build/webpack": "cross-env NODE_ENV=prod webpack --env.foo=bar --profile --progress --config ./build/webpack.config.js"
1614
},
1715
"repository": {

sqrt.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

test/test.sqrt.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)