Skip to content

Commit e7ea8dd

Browse files
committed
Unit tests covering the extensions argument
1 parent f35c0eb commit e7ea8dd

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/make-args.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ suite.addBatch({
112112
}
113113

114114
},
115-
'values (without filters)': {
115+
'values (without filters or extensions)': {
116116
topic: makeArgs({
117117
'verbosity': 1,
118118
'counting': 'total',
@@ -135,7 +135,16 @@ suite.addBatch({
135135
assert.includes(args, '/path/to/file1 /path/to/file2');
136136
},
137137
'should not pass a filter value': function (err, args) {
138-
assert.equal(args.length, 4); // not quite good enough...
138+
var i;
139+
for (i = 0; i < args.length; i += 1) {
140+
assert.isFalse(args[i].indexOf('filter') !== -1, 'filter was in the list of arguments');
141+
}
142+
},
143+
'should not pass an extensions value': function (err, args) {
144+
var i;
145+
for (i = 0; i < args.length; i += 1) {
146+
assert.isFalse(args[i].indexOf('extensions') !== -1, 'extensions was in the list of arguments');
147+
}
139148
}
140149
}
141150
});

0 commit comments

Comments
 (0)