mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Tests: ensure truncated PNG test handles possible race
This commit is contained in:
parent
f5109560d6
commit
9a54a034e1
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user