Skip to content

Commit

Permalink
More specific waitFor events
Browse files Browse the repository at this point in the history
Trying to address outlier false negatives in Windows node v0.10
https://ci.appveyor.com/project/es128/chokidar/build/117/job/67lb6lki49xqqau9
  • Loading branch information
es128 committed Nov 9, 2015
1 parent 63662b8 commit 5e330b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,10 @@ function runTests(options) {
addSpy.should.not.have.been.called;
changeSpy.should.not.have.been.called;
fs.unlinkSync(testPath);
waitFor([unlinkSpy], function() {
waitFor([unlinkSpy.withArgs(testPath)], function() {
unlinkSpy.should.have.been.calledWith(testPath);
fs.writeFileSync(testPath, 'b');
waitFor([addSpy], function() {
waitFor([addSpy.withArgs(testPath)], function() {
addSpy.should.have.been.calledWith(testPath);
changeSpy.should.not.have.been.called;
done();
Expand Down Expand Up @@ -331,7 +331,7 @@ function runTests(options) {
fs.mkdirSync(parentPath);
d(function() {
fs.rmdirSync(parentPath);
waitFor([unlinkSpy], function() {
waitFor([unlinkSpy.withArgs(parentPath)], function() {
unlinkSpy.should.have.been.calledWith(parentPath);
d(function() {
fs.mkdirSync(parentPath);
Expand Down Expand Up @@ -1396,7 +1396,7 @@ function runTests(options) {
setTimeout(function() {
watcher.on('change', changeSpy);
fs.writeFileSync(testPath, 'edit');
waitFor([changeSpy], function() {
waitFor([changeSpy.withArgs(testPath)], function() {
changeSpy.should.have.been.calledWith(testPath);
done();
});
Expand Down

0 comments on commit 5e330b0

Please sign in to comment.