File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 71
71
"lint" : " eslint --max-warnings 0 --ext js . && eslint --max-warnings 0 --ext ts ." ,
72
72
"build" : " node scripts/build" ,
73
73
"watch" : " node scripts/build --watch" ,
74
- "coverage" : " ASC_FEATURES=\" *\" c8 npm run test:coverage " ,
74
+ "coverage" : " ASC_FEATURES=\" *\" ASC_COVERAGERUN=1 c8 npm run test" ,
75
75
"test" : " npm run test:parser && npm run test:compiler -- --parallel && npm run test:browser && npm run test:asconfig && npm run test:transform" ,
76
- "test:coverage" : " npm run test:parser && npm run test:compiler && npm run test:browser && npm run test:asconfig && npm run test:transform" ,
77
76
"test:parser" : " node --enable-source-maps tests/parser" ,
78
77
"test:compiler" : " node --enable-source-maps --experimental-wasi-unstable-preview1 --no-warnings tests/compiler" ,
79
78
"test:browser" : " node --enable-source-maps tests/browser" ,
Original file line number Diff line number Diff line change @@ -79,6 +79,8 @@ if (args.help) {
79
79
}
80
80
81
81
const features = process . env . ASC_FEATURES ? process . env . ASC_FEATURES . split ( "," ) : [ ] ;
82
+ //Disable parallel run during test coverage report generation
83
+ const coverageRun = process . env . ASC_FEATURES ? true : false ;
82
84
const featuresConfig = require ( "./features.json" ) ;
83
85
const basedir = path . join ( dirname , "compiler" ) ;
84
86
@@ -501,7 +503,7 @@ function evaluateResult(failedTests, skippedTests) {
501
503
}
502
504
503
505
// Run tests in parallel if requested
504
- if ( args . parallel && coreCount > 2 ) {
506
+ if ( args . parallel && coreCount > 2 && ! coverageRun ) {
505
507
if ( cluster . isWorker ) {
506
508
process . on ( "message" , msg => {
507
509
if ( msg . cmd != "run" ) throw Error ( "invalid command: " + JSON . stringify ( msg ) ) ;
You can’t perform that action at this time.
0 commit comments