@@ -66,7 +66,7 @@ describe('nyc', function () {
66
66
describe ( 'config' , function ( ) {
67
67
it ( "loads 'exclude' patterns from package.json#nyc" , function ( ) {
68
68
var nyc = new NYC ( configUtil . loadConfig ( [ ] , path . resolve ( __dirname , '../fixtures' ) ) )
69
- nyc . exclude . exclude . length . should . eql ( 5 )
69
+ nyc . exclude . exclude . length . should . eql ( 8 )
70
70
} )
71
71
72
72
it ( "loads 'extension' patterns from package.json#nyc" , function ( ) {
@@ -91,14 +91,14 @@ describe('nyc', function () {
91
91
92
92
it ( "ignores 'exclude' option if it's falsy" , function ( ) {
93
93
var nyc1 = new NYC ( configUtil . loadConfig ( [ ] , path . resolve ( __dirname , '../fixtures/conf-empty' ) ) )
94
- nyc1 . exclude . exclude . length . should . eql ( 7 )
94
+ nyc1 . exclude . exclude . length . should . eql ( 10 )
95
95
} )
96
96
97
97
it ( "allows for empty 'exclude'" , function ( ) {
98
98
var nyc2 = new NYC ( { exclude : [ ] } )
99
99
100
- // an empty exclude still has ! **/node_modules/** added.
101
- nyc2 . exclude . exclude . length . should . eql ( 1 )
100
+ // an empty exclude still has **/node_modules/**, node_modules/** and added.
101
+ nyc2 . exclude . exclude . length . should . eql ( 2 )
102
102
} )
103
103
} )
104
104
0 commit comments