Skip to content

Commit

Permalink
Merge pull request #1266 from nmccready/4.0
Browse files Browse the repository at this point in the history
added a spec to make sure no functions are kicked off when they should not be
  • Loading branch information
phated committed Oct 18, 2015
2 parents 13e25e2 + fbe2f67 commit 1ab1d2a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,21 @@ describe('gulp', function() {
});


it('should not call the function when no file changes: no options', function(done) {
var tempFile = path.join(outpath, 'watch-func.txt');

createTempFile(tempFile);

var watcher = gulp.watch(tempFile, function() {
should.fail('Watcher erroneously called');
});

setTimeout(function() {
watcher.close();
done();
}, 10);
});

it('should call the function when file changes: w/ options', function(done) {
var tempFile = path.join(outpath, 'watch-func-options.txt');

Expand Down

0 comments on commit 1ab1d2a

Please sign in to comment.