mirror of
https://github.com/lovell/sharp.git
synced 2025-07-09 18:40:16 +02:00
Tests: reduce time taken by metadata tests
This commit is contained in:
parent
67213ae86c
commit
171aade9cd
BIN
test/fixtures/expected/hilutite.jpg
vendored
BIN
test/fixtures/expected/hilutite.jpg
vendored
Binary file not shown.
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 424 KiB |
BIN
test/fixtures/expected/icc-cmyk.jpg
vendored
BIN
test/fixtures/expected/icc-cmyk.jpg
vendored
Binary file not shown.
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 943 KiB |
@ -504,6 +504,7 @@ describe('Image metadata', function () {
|
||||
it('Apply CMYK output ICC profile', function (done) {
|
||||
const output = fixtures.path('output.icc-cmyk.jpg');
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(64)
|
||||
.withMetadata({ icc: 'cmyk' })
|
||||
.toFile(output, function (err, info) {
|
||||
if (err) throw err;
|
||||
@ -528,11 +529,11 @@ describe('Image metadata', function () {
|
||||
it('Apply custom output ICC profile', function (done) {
|
||||
const output = fixtures.path('output.hilutite.jpg');
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(64)
|
||||
.withMetadata({ icc: fixtures.path('hilutite.icm') })
|
||||
.toFile(output, function (err, info) {
|
||||
if (err) throw err;
|
||||
fixtures.assertMaxColourDistance(output, fixtures.path('expected/hilutite.jpg'), 0);
|
||||
fixtures.assertMaxColourDistance(output, fixtures.inputJpg, 16.5);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user