Skip to content

Commit

Permalink
Tests: ensure truncated PNG test handles possible race
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Sep 4, 2022
1 parent f510956 commit 9a54a03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/unit/failOn.js
Expand Up @@ -23,7 +23,7 @@ describe('failOn', () => {
let isWarningEmitted = false;
sharp(fixtures.inputPngTruncated, { failOn: 'none' })
.on('warning', function (warning) {
assert.ok(warning.includes('not enough data') || warning.includes('end of stream'));
assert.ok(['read gave 2 warnings', 'not enough data', 'end of stream'].includes(warning));
isWarningEmitted = true;
})
.resize(32, 24)
Expand Down

0 comments on commit 9a54a03

Please sign in to comment.