Skip to content

Commit

Permalink
fix: use blank ignore, so that the behavior of fileset is non-breaking
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Coe committed Dec 19, 2016
1 parent 8750735 commit 7659ef9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions lib/file-matcher.js
Expand Up @@ -26,7 +26,7 @@ function filesFor(options, callback) {
includes = includes && Array.isArray(includes) ? includes : [ '**/*.js' ];
excludes = excludes && Array.isArray(excludes) ? excludes : [ '**/node_modules/**' ];

opts = { cwd: root, nodir: true };
opts = { cwd: root, nodir: true, ignore: [] };
seq += 1;
opts['x' + seq + new Date().getTime()] = true; //cache buster for minimatch cache bug
fileset(includes.join(' '), excludes.join(' '), opts, function (err, files) {
Expand Down Expand Up @@ -74,4 +74,3 @@ module.exports = {
filesFor: filesFor,
matcherFor: matcherFor
};

2 changes: 1 addition & 1 deletion test/run-cover.test.js
Expand Up @@ -122,7 +122,7 @@ describe('run cover', function () {
assert.ok(coverageMap);
assert.ok(coverageMap[path.resolve(codeRoot, 'context.js')]);
assert.ok(coverageMap[path.resolve(codeRoot, 'foo.js')]);
assert.ifError(coverageMap[path.resolve(codeRoot, 'node_modules', 'adder.js')]);
assert.ok(coverageMap[path.resolve(codeRoot, 'node_modules', 'adder.js')]);
cb();
});
});
Expand Down
4 changes: 2 additions & 2 deletions test/run-instrument.test.js
Expand Up @@ -144,7 +144,7 @@ describe('run instrument', function () {
function (err) {
assert.ok(!err);
assert.ok(fs.existsSync(outFile('foo.js')));
assert.ok(!fs.existsSync(outFile('node_modules/adder.js')));
assert.ok(fs.existsSync(outFile('node_modules/adder.js')));
assert.ok(fs.existsSync(outFile('baseline.raw.json')));
cb();
});
Expand Down Expand Up @@ -206,4 +206,4 @@ describe('run instrument', function () {
});
});
});
});
});

0 comments on commit 7659ef9

Please sign in to comment.