Remove previously-deprecated properties from API

This commit is contained in:
Lovell Fuller
2025-12-29 13:04:27 +00:00
parent 937167933b
commit 1b2f79335d
13 changed files with 31 additions and 134 deletions

View File

@@ -54,23 +54,6 @@ describe('failOn', () => {
);
});
it('deprecated failOnError', () => {
assert.doesNotThrow(
() => sharp({ failOnError: true })
);
assert.doesNotThrow(
() => sharp({ failOnError: false })
);
assert.throws(
() => sharp({ failOnError: 'zoinks' }),
/Expected boolean for failOnError but received zoinks of type string/
);
assert.throws(
() => sharp({ failOnError: 1 }),
/Expected boolean for failOnError but received 1 of type number/
);
});
it('returns errors to callback for truncated JPEG', (_t, done) => {
sharp(fixtures.inputJpgTruncated, { failOn: 'truncated' }).toBuffer((err, data, info) => {
assert.ok(err.message.includes('VipsJpeg: premature end of'), err);