@@ -71,6 +71,29 @@ describe('the nyc cli', function () {
71
71
} )
72
72
} )
73
73
74
+ describe ( '--ignore-class-method' , function ( ) {
75
+ it ( 'skips methods that match ignored name but still catches those that are not' , function ( done ) {
76
+ var args = [ bin , '--all' , '--ignore-class-method' , 'skip' , process . execPath , './classes.js' ]
77
+
78
+ var proc = spawn ( process . execPath , args , {
79
+ cwd : fixturesCLI ,
80
+ env : env
81
+ } )
82
+
83
+ var stdout = ''
84
+ proc . stdout . on ( 'data' , function ( chunk ) {
85
+ stdout += chunk
86
+ } )
87
+
88
+ proc . on ( 'close' , function ( code ) {
89
+ code . should . equal ( 0 )
90
+ var classesOutput = ( stdout . match ( / ^ ( .* c l a s s e s \. j s ) .* $ / m) || [ 'no result found' ] ) [ 0 ]
91
+ classesOutput . should . match ( / 6 \| / )
92
+ done ( )
93
+ } )
94
+ } )
95
+ } )
96
+
74
97
describe ( '--check-coverage' , function ( ) {
75
98
it ( 'fails when the expected coverage is below a threshold' , function ( done ) {
76
99
var args = [ bin , '--check-coverage' , '--lines' , '51' , process . execPath , './half-covered.js' ]
@@ -379,7 +402,6 @@ describe('the nyc cli', function () {
379
402
} )
380
403
381
404
describe ( 'coverage' , function ( ) {
382
- if ( parseInt ( process . versions . node . split ( '.' ) [ 0 ] ) < 4 ) return
383
405
it ( 'reports appropriate coverage information for es6 source files' , function ( done ) {
384
406
var args = [ bin , '--reporter=lcov' , '--reporter=text' , process . execPath , './es6.js' ]
385
407
0 commit comments