This repository was archived by the owner on Oct 26, 2018. It is now read-only.
File tree 2 files changed +8
-12
lines changed
2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -11,10 +11,9 @@ module.exports = function (config) {
11
11
if ( runCoverage ) {
12
12
coverageLoaders . push ( {
13
13
test : / \. j s $ / ,
14
- include : path . resolve ( 'modules/' ) ,
15
- exclude : / _ _ t e s t s _ _ / ,
14
+ include : path . resolve ( 'src/' ) ,
16
15
loader : 'isparta'
17
- } )
16
+ } ) ,
18
17
19
18
coverageReporters . push ( 'coverage' ) ;
20
19
}
@@ -42,17 +41,11 @@ module.exports = function (config) {
42
41
{
43
42
test : / \. j s $ / ,
44
43
exclude : [
45
- path . resolve ( 'src/' ) ,
46
44
path . resolve ( 'node_modules/' )
47
45
] ,
48
46
loader : 'babel'
49
47
} ,
50
- {
51
- test : / \. j s $ / ,
52
- include : path . resolve ( 'src/' ) ,
53
- loader : 'isparta'
54
- }
55
- ]
48
+ ] . concat ( coverageLoaders )
56
49
}
57
50
} ,
58
51
@@ -63,7 +56,7 @@ module.exports = function (config) {
63
56
coverageReporter : {
64
57
reporters : [
65
58
{ type : 'text' } ,
66
- { type : 'html ' , subdir : 'html ' }
59
+ { type : 'json ' , subdir : 'browser-coverage' , file : 'coverage.json ' }
67
60
]
68
61
}
69
62
} ) ;
Original file line number Diff line number Diff line change 15
15
"build" : " mkdir -p lib && babel ./src/index.js --out-file ./lib/index.js" ,
16
16
"test" : " mocha --compilers js:babel-core/register --recursive" ,
17
17
"test:browser" : " karma start" ,
18
- "test:cov" : " babel-node $(npm bin)/isparta cover $(npm bin)/_mocha -- --recursive" ,
18
+ "test:cov" : " npm run test:cov:browser && npm run test:cov:node && npm run test:cov:report" ,
19
+ "test:cov:node" : " babel-node $(npm bin)/isparta cover $(npm bin)/_mocha report --dir ./coverage/node-coverage -- --recursive" ,
20
+ "test:cov:browser" : " COVERAGE=true karma start" ,
21
+ "test:cov:report" : " $(npm bin)/istanbul report --dir ./coverage --include **/*coverage.json html text" ,
19
22
"prepublish" : " npm run build"
20
23
},
21
24
"tags" : [
You can’t perform that action at this time.
0 commit comments