Skip to content

Commit

Permalink
Wrap flapping event test in nextTick
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Apr 21, 2015
1 parent dacd624 commit 21ba1df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/io.js
Expand Up @@ -804,9 +804,9 @@ describe('Input/output', function() {
sharp(fixtures.inputJpg)
.resize(320, 240)
.toBuffer(function(err) {
sharp.queue.removeListener('change', queueListener);
if (err) throw err;
process.nextTick(function() {
sharp.queue.removeListener('change', queueListener);
if (err) throw err;
assert.strictEqual(2, eventCounter);
done();
});
Expand Down

0 comments on commit 21ba1df

Please sign in to comment.