File tree 1 file changed +12
-24
lines changed
1 file changed +12
-24
lines changed Original file line number Diff line number Diff line change @@ -66,34 +66,22 @@ if ([
66
66
var mainChildExitCode = process . exitCode
67
67
68
68
if ( argv . checkCoverage ) {
69
- checkCoverage ( argv )
69
+ nyc . checkCoverage ( {
70
+ lines : argv . lines ,
71
+ functions : argv . functions ,
72
+ branches : argv . branches ,
73
+ statements : argv . statements
74
+ } , argv [ 'per-file' ] )
70
75
process . exitCode = process . exitCode || mainChildExitCode
71
- if ( ! argv . silent ) report ( argv )
72
- return done ( )
73
- } else {
74
- if ( ! argv . silent ) report ( argv )
75
- return done ( )
76
76
}
77
+
78
+ if ( ! argv . silent ) {
79
+ nyc . report ( )
80
+ }
81
+
82
+ return done ( )
77
83
} )
78
84
} else {
79
85
// I don't have a clue what you're doing.
80
86
yargs . showHelp ( )
81
87
}
82
-
83
- function report ( argv ) {
84
- process . env . NYC_CWD = process . cwd ( )
85
-
86
- var nyc = new NYC ( argv )
87
- nyc . report ( )
88
- }
89
-
90
- function checkCoverage ( argv , cb ) {
91
- process . env . NYC_CWD = process . cwd ( )
92
-
93
- ; ( new NYC ( argv ) ) . checkCoverage ( {
94
- lines : argv . lines ,
95
- functions : argv . functions ,
96
- branches : argv . branches ,
97
- statements : argv . statements
98
- } , argv [ 'per-file' ] )
99
- }
You can’t perform that action at this time.
0 commit comments