File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -18,24 +18,24 @@ const baseline = 95;
1818
1919const statementsCoverage = ( info . coveredStatements / info . statements ) * 100 ;
2020if ( statementsCoverage <= baseline ) {
21- console . log ( `Statements is required to be ${ baseline } % or higher. Currently ${ statementsCoverage . toFixed ( 2 ) } ` ) ;
22- process . exit ( ) ;
21+ throw new Error ( `Statements is required to be ${ baseline } % or higher. Currently ${ statementsCoverage . toFixed ( 2 ) } ` ) ;
2322}
2423
2524const conditionalsCoverage = ( info . coveredConditionals / info . conditionals ) * 100 ;
2625if ( conditionalsCoverage <= baseline ) {
27- console . log ( `Conditionals is required to be ${ baseline } % or higher. Currently ${ conditionalsCoverage . toFixed ( 2 ) } ` ) ;
28- process . exit ( ) ;
26+ throw new Error (
27+ `Conditionals is required to be ${ baseline } % or higher. Currently ${ conditionalsCoverage . toFixed ( 2 ) } `
28+ ) ;
2929}
3030
3131const methodsCoverage = ( info . coveredMethods / info . methods ) * 100 ;
3232if ( methodsCoverage <= baseline ) {
33- console . log ( `Methods is required to be ${ baseline } % or higher. Currently ${ methodsCoverage . toFixed ( 2 ) } ` ) ;
34- process . exit ( ) ;
33+ throw new Error ( `Methods is required to be ${ baseline } % or higher. Currently ${ methodsCoverage . toFixed ( 2 ) } ` ) ;
3534}
3635
3736const combinedCoverage = statementsCoverage + conditionalsCoverage + methodsCoverage ;
3837if ( combinedCoverage <= baseline ) {
39- console . log ( `Everything Combined is required to be ${ baseline } % or higher. Currently ${ combinedCoverage . toFixed ( 2 ) } ` ) ;
40- process . exit ( ) ;
38+ throw new Error (
39+ `Everything Combined is required to be ${ baseline } % or higher. Currently ${ combinedCoverage . toFixed ( 2 ) } `
40+ ) ;
4141}
You can’t perform that action at this time.
0 commit comments