This repository was archived by the owner on Oct 26, 2018. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Expand file tree Collapse file tree 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) {
1111 if ( runCoverage ) {
1212 coverageLoaders . push ( {
1313 test : / \. j s $ / ,
14- include : path . resolve ( 'modules/' ) ,
15- exclude : / _ _ t e s t s _ _ / ,
14+ include : path . resolve ( 'src/' ) ,
1615 loader : 'isparta'
17- } )
16+ } ) ,
1817
1918 coverageReporters . push ( 'coverage' ) ;
2019 }
@@ -42,17 +41,11 @@ module.exports = function (config) {
4241 {
4342 test : / \. j s $ / ,
4443 exclude : [
45- path . resolve ( 'src/' ) ,
4644 path . resolve ( 'node_modules/' )
4745 ] ,
4846 loader : 'babel'
4947 } ,
50- {
51- test : / \. j s $ / ,
52- include : path . resolve ( 'src/' ) ,
53- loader : 'isparta'
54- }
55- ]
48+ ] . concat ( coverageLoaders )
5649 }
5750 } ,
5851
@@ -63,7 +56,7 @@ module.exports = function (config) {
6356 coverageReporter : {
6457 reporters : [
6558 { type : 'text' } ,
66- { type : 'html ' , subdir : 'html ' }
59+ { type : 'json ' , subdir : 'browser-coverage' , file : 'coverage.json ' }
6760 ]
6861 }
6962 } ) ;
Original file line number Diff line number Diff line change 1515 "build" : " mkdir -p lib && babel ./src/index.js --out-file ./lib/index.js" ,
1616 "test" : " mocha --compilers js:babel-core/register --recursive" ,
1717 "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" ,
1922 "prepublish" : " npm run build"
2023 },
2124 "tags" : [
You can’t perform that action at this time.
0 commit comments