Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

Commit

Permalink
Fix semistandard version to the last version that works on Mac OS (see
Browse files Browse the repository at this point in the history
…standard/semistandard#266) and fix semistandard issues.
  • Loading branch information
apodolny committed Jul 5, 2020
1 parent 1cd0c9b commit a949088
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 110 deletions.
1 change: 0 additions & 1 deletion lib/operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ function correlate (referenceImage, options) {
if (options && options.fast && !is.bool(options.fast)) {
throw is.invalidParameterError('options.fast', 'boolean', options.fast);
}

this.options.correlation = this._createInputDescriptor(referenceImage, options);
this.options.corrFast = (options && options.fast) || false;
return this;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@
"prebuild": "^10.0.0",
"prebuild-ci": "^3.1.0",
"rimraf": "^3.0.2",
"semistandard": "^14.2.0"
"semistandard": "14.2.0"
},
"license": "Apache-2.0",
"config": {
Expand Down
9 changes: 2 additions & 7 deletions test/unit/correlate.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
'use strict';

const fs = require('fs');
const assert = require('assert');

const fixtures = require('../fixtures');
const sharp = require('../../');

describe('Correlate operation between two images', function () {
const landscape1 = fs.readFileSync(fixtures.inputJpgWithLandscapeExif1);
const landscape1Flower = fs.readFileSync(fixtures.inputJpgFlowerCroppedFromLandscape1);

it('spcor correlation', function (done) {
sharp(fixtures.inputJpgWithLandscapeExif1)
.correlate(fixtures.inputJpgFlowerCroppedFromLandscape1)
Expand All @@ -22,7 +18,7 @@ describe('Correlate operation between two images', function () {

it('fastcor correlation', function (done) {
sharp(fixtures.inputJpgWithLandscapeExif1)
.correlate(fixtures.inputJpgFlowerCroppedFromLandscape1, {fast: true})
.correlate(fixtures.inputJpgFlowerCroppedFromLandscape1, { fast: true })
.toBuffer(function (err, data, info) {
if (err) throw err;
assert.strictEqual(450, info.height);
Expand All @@ -32,7 +28,7 @@ describe('Correlate operation between two images', function () {

it('fast is not boolean throws', function () {
assert.throws(function () {
sharp().correlate(fixtures.inputJpgFlowerCroppedFromLandscape1, {fast: 123});
sharp().correlate(fixtures.inputJpgFlowerCroppedFromLandscape1, { fast: 123 });
});
});

Expand All @@ -42,4 +38,3 @@ describe('Correlate operation between two images', function () {
});
});
});

Loading

0 comments on commit a949088

Please sign in to comment.