mirror of
https://github.com/lovell/sharp.git
synced 2026-02-04 21:56:18 +01:00
Improve thread-safety of error and warning message handling.
Ensures all message reading occurs before thread shutdown.
This commit is contained in:
@@ -642,7 +642,7 @@ describe('Image metadata', () => {
|
||||
});
|
||||
|
||||
it('keep existing ICC profile', async () => {
|
||||
const data = await sharp(fixtures.inputJpgWithExif)
|
||||
const data = await sharp(fixtures.inputJpgWithExif, { failOn: 'error' })
|
||||
.keepIccProfile()
|
||||
.toBuffer();
|
||||
|
||||
@@ -675,7 +675,7 @@ describe('Image metadata', () => {
|
||||
});
|
||||
|
||||
it('keep existing ICC profile, avoid colour transform', async () => {
|
||||
const [r, g, b] = await sharp(fixtures.inputPngWithProPhotoProfile)
|
||||
const [r, g, b] = await sharp(fixtures.inputPngWithProPhotoProfile, { failOn: 'error' })
|
||||
.keepIccProfile()
|
||||
.raw()
|
||||
.toBuffer();
|
||||
@@ -721,7 +721,7 @@ describe('Image metadata', () => {
|
||||
});
|
||||
|
||||
it('transform to invalid ICC profile emits warning', async () => {
|
||||
const img = sharp({ create })
|
||||
const img = sharp({ create, failOn: 'error' })
|
||||
.png()
|
||||
.withIccProfile(fixtures.path('invalid-illuminant.icc'));
|
||||
|
||||
|
||||
@@ -122,7 +122,6 @@ describe('TIFF', () => {
|
||||
sharp(fixtures.inputTiff8BitDepth)
|
||||
.toColourspace('b-w') // can only squash 1 band uchar images
|
||||
.tiff({
|
||||
bitdepth: 8,
|
||||
compression: 'none',
|
||||
predictor: 'none'
|
||||
})
|
||||
@@ -154,7 +153,7 @@ describe('TIFF', () => {
|
||||
it('Invalid TIFF bitdepth value throws error', () => {
|
||||
assert.throws(() => {
|
||||
sharp().tiff({ bitdepth: 3 });
|
||||
}, /Error: Expected 1, 2, 4 or 8 for bitdepth but received 3 of type number/);
|
||||
}, /Error: Expected 1, 2 or 4 for bitdepth but received 3 of type number/);
|
||||
});
|
||||
|
||||
it('TIFF setting xres and yres on file', () =>
|
||||
|
||||
Reference in New Issue
Block a user