Skip to content

Commit

Permalink
test: should not match dotfiles unless asked
Browse files Browse the repository at this point in the history
  • Loading branch information
novemberborn authored and remy committed Feb 25, 2016
1 parent 3d19aee commit 12b8935
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/monitor/match.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,22 @@ describe('watcher', function () {
})
});

it('should not match a dotfile unless explicitly asked to', function (done) {
config.load({
watch: ['test/fixtures/*']
}, function (config) {
return watch.watch()
.then(function (files) {
var withDotfile = files.filter(function (file) {
return /test\/fixtures\/\.dotfile$/.test(file);
});
assert.deepEqual(withDotfile.length, 0, 'should not contain .dotfile');
done();
})
.catch(done);
})
});

it('should match a dotfile if explicitly asked to', function (done) {
config.load({
watch: ['test/fixtures/.dotfile']
Expand Down

0 comments on commit 12b8935

Please sign in to comment.