mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Wrap flapping event test in nextTick
This commit is contained in:
parent
dacd62428e
commit
21ba1dfc26
@ -804,9 +804,9 @@ describe('Input/output', function() {
|
|||||||
sharp(fixtures.inputJpg)
|
sharp(fixtures.inputJpg)
|
||||||
.resize(320, 240)
|
.resize(320, 240)
|
||||||
.toBuffer(function(err) {
|
.toBuffer(function(err) {
|
||||||
sharp.queue.removeListener('change', queueListener);
|
|
||||||
if (err) throw err;
|
|
||||||
process.nextTick(function() {
|
process.nextTick(function() {
|
||||||
|
sharp.queue.removeListener('change', queueListener);
|
||||||
|
if (err) throw err;
|
||||||
assert.strictEqual(2, eventCounter);
|
assert.strictEqual(2, eventCounter);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user