Skip to content

Commit

Permalink
Tests: avoid shrink-on-load for (non-turbo) libjpeg compat
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Sep 21, 2018
1 parent 0ce8ad7 commit 93aac66
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
Binary file modified test/fixtures/expected/extract-lch.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/expected/tint-blue.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/expected/tint-cmyk.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/expected/tint-green.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/expected/tint-red.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/expected/tint-sepia.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion test/unit/extractChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ describe('Image channel extraction', function () {
sharp(fixtures.inputJpg)
.toColourspace('lch')
.extractChannel(1)
.resize(320, 240)
.resize(320, 240, { fastShrinkOnLoad: false })
.toFile(output, function (err, info) {
if (err) throw err;
assert.strictEqual(320, info.width);
Expand Down
14 changes: 7 additions & 7 deletions test/unit/tint.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Tint', function () {
it('tints rgb image red', function (done) {
const output = fixtures.path('output.tint-red.jpg');
sharp(fixtures.inputJpg)
.resize(320, 240)
.resize(320, 240, { fastShrinkOnLoad: false })
.tint('#FF0000')
.toFile(output, function (err, info) {
if (err) throw err;
Expand All @@ -22,7 +22,7 @@ describe('Tint', function () {
it('tints rgb image green', function (done) {
const output = fixtures.path('output.tint-green.jpg');
sharp(fixtures.inputJpg)
.resize(320, 240)
.resize(320, 240, { fastShrinkOnLoad: false })
.tint('#00FF00')
.toFile(output, function (err, info) {
if (err) throw err;
Expand All @@ -35,7 +35,7 @@ describe('Tint', function () {
it('tints rgb image blue', function (done) {
const output = fixtures.path('output.tint-blue.jpg');
sharp(fixtures.inputJpg)
.resize(320, 240)
.resize(320, 240, { fastShrinkOnLoad: false })
.tint('#0000FF')
.toFile(output, function (err, info) {
if (err) throw err;
Expand All @@ -48,7 +48,7 @@ describe('Tint', function () {
it('tints rgb image with sepia tone', function (done) {
const output = fixtures.path('output.tint-sepia.jpg');
sharp(fixtures.inputJpg)
.resize(320, 240)
.resize(320, 240, { fastShrinkOnLoad: false })
.tint('#704214')
.toFile(output, function (err, info) {
if (err) throw err;
Expand All @@ -62,7 +62,7 @@ describe('Tint', function () {
it('tints rgb image with sepia tone with rgb colour', function (done) {
const output = fixtures.path('output.tint-sepia.jpg');
sharp(fixtures.inputJpg)
.resize(320, 240)
.resize(320, 240, { fastShrinkOnLoad: false })
.tint([112, 66, 20])
.toFile(output, function (err, info) {
if (err) throw err;
Expand All @@ -76,7 +76,7 @@ describe('Tint', function () {
it('tints rgb image with alpha channel', function (done) {
const output = fixtures.path('output.tint-alpha.png');
sharp(fixtures.inputPngRGBWithAlpha)
.resize(320, 240)
.resize(320, 240, { fastShrinkOnLoad: false })
.tint('#704214')
.toFile(output, function (err, info) {
if (err) throw err;
Expand All @@ -90,7 +90,7 @@ describe('Tint', function () {
it('tints cmyk image red', function (done) {
const output = fixtures.path('output.tint-cmyk.jpg');
sharp(fixtures.inputJpgWithCmykProfile)
.resize(320, 240)
.resize(320, 240, { fastShrinkOnLoad: false })
.tint('#FF0000')
.toFile(output, function (err, info) {
if (err) throw err;
Expand Down

0 comments on commit 93aac66

Please sign in to comment.