mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +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;
|
let isWarningEmitted = false;
|
||||||
sharp(fixtures.inputPngTruncated, { failOn: 'none' })
|
sharp(fixtures.inputPngTruncated, { failOn: 'none' })
|
||||||
.on('warning', function (warning) {
|
.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;
|
isWarningEmitted = true;
|
||||||
})
|
})
|
||||||
.resize(32, 24)
|
.resize(32, 24)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user