Skip to content

Commit

Permalink
Reduce chance of race condition in test for... race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Nov 13, 2022
1 parent df97120 commit a9d692f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/metadata.js
Expand Up @@ -443,13 +443,13 @@ describe('Image metadata', function () {
const create = { width: 1, height: 1, channels: 3, background: 'red' };
const image1 = sharp({ create }).png().pipe(sharp());
const image2 = sharp({ create }).png().pipe(sharp());
process.nextTick(async () => {
setTimeout(async () => {
const data1 = await image1.metadata();
assert.strictEqual('png', data1.format);
const data2 = await image2.metadata();
assert.strictEqual('png', data2.format);
done();
});
}, 500);
});

it('Stream', function (done) {
Expand Down

0 comments on commit a9d692f

Please sign in to comment.