@@ -71,6 +71,29 @@ describe('the nyc cli', function () {
7171 } )
7272 } )
7373
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+
7497 describe ( '--check-coverage' , function ( ) {
7598 it ( 'fails when the expected coverage is below a threshold' , function ( done ) {
7699 var args = [ bin , '--check-coverage' , '--lines' , '51' , process . execPath , './half-covered.js' ]
@@ -379,7 +402,6 @@ describe('the nyc cli', function () {
379402 } )
380403
381404 describe ( 'coverage' , function ( ) {
382- if ( parseInt ( process . versions . node . split ( '.' ) [ 0 ] ) < 4 ) return
383405 it ( 'reports appropriate coverage information for es6 source files' , function ( done ) {
384406 var args = [ bin , '--reporter=lcov' , '--reporter=text' , process . execPath , './es6.js' ]
385407
0 commit comments