mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 10:30:15 +02:00
Tests: relax truncated PNG test assertion
This commit is contained in:
parent
55c4d8807c
commit
1eb66c0944
@ -23,7 +23,9 @@ describe('failOn', () => {
|
||||
let isWarningEmitted = false;
|
||||
sharp(fixtures.inputPngTruncated, { failOn: 'none' })
|
||||
.on('warning', function (warning) {
|
||||
assert.ok(['read gave 2 warnings', 'not enough data', 'end of stream'].includes(warning));
|
||||
assert.ok(
|
||||
['read gave 2 warnings', 'not enough data', 'end of stream']
|
||||
.some(m => warning.includes(m)));
|
||||
isWarningEmitted = true;
|
||||
})
|
||||
.resize(32, 24)
|
||||
|
Loading…
x
Reference in New Issue
Block a user