Skip to content

Commit

Permalink
Trying a different tweak for test failing on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
es128 committed Jul 29, 2015
1 parent 5bd9227 commit 126b3b0
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1246,22 +1246,20 @@ function runTests(options) {
it('should ignore unwatched paths that are a subset of watched paths', function(done) {
var spy = sinon.spy();
watcher = chokidar.watch(fixturesPath, options)
.on('all', spy)
.on('ready', d(function() {
watcher.on('all', spy);
watcher.unwatch([getFixturePath('subdir'), getFixturePath('unl*')]);
d(function() {
fs.writeFileSync(getFixturePath('subdir/add.txt'), 'c');
fs.writeFileSync(getFixturePath('change.txt'), 'c');
fs.unlinkSync(getFixturePath('unlink.txt'));
waitFor([spy], function() {
spy.should.have.been.calledWith('change', getFixturePath('change.txt'));
spy.should.not.have.been.calledWith('add');
spy.should.not.have.been.calledWith('unlink');
if (!osXFsWatch) spy.should.have.been.calledOnce;
done();
});
})();
}));
fs.writeFileSync(getFixturePath('subdir/add.txt'), 'c');
fs.writeFileSync(getFixturePath('change.txt'), 'c');
fs.unlinkSync(getFixturePath('unlink.txt'));
waitFor([spy], function() {
spy.should.have.been.calledWith('change', getFixturePath('change.txt'));
spy.should.not.have.been.calledWith('add');
spy.should.not.have.been.calledWith('unlink');
if (!osXFsWatch) spy.should.have.been.calledOnce;
done();
});
}, true));
});
it('should unwatch relative paths', function(done) {
var spy = sinon.spy();
Expand Down

0 comments on commit 126b3b0

Please sign in to comment.