Skip to content

Commit

Permalink
Another timing tweak for this test
Browse files Browse the repository at this point in the history
Trying to get it to pass in Travis. Can’t replicate the failure locally
unfortunately.
  • Loading branch information
es128 committed Jul 29, 2015
1 parent 8d080b1 commit ab80b1c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1249,17 +1249,19 @@ function runTests(options) {
.on('all', spy)
.on('ready', d(function() {
watcher.unwatch([getFixturePath('subdir'), getFixturePath('unl*')]);
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();
});
}));
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();
});
}, true));
});
it('should unwatch relative paths', function(done) {
var spy = sinon.spy();
Expand Down

0 comments on commit ab80b1c

Please sign in to comment.