mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Switch linter from semistandard to biome
Uses the recommended rules apart from complexity/useArrowFunction, which would affect about 1700 lines of code with little benefit right now. This is something that can be addressed over time.
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
// Copyright 2013 Lovell Fuller and others.
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const assert = require('assert');
|
||||
const fs = require('node:fs');
|
||||
const assert = require('node:assert');
|
||||
|
||||
const fixtures = require('../fixtures');
|
||||
const sharp = require('../../');
|
||||
@@ -18,7 +16,7 @@ describe('Boolean operation between two images', function () {
|
||||
sharp.bool.eor
|
||||
]
|
||||
.forEach(function (op) {
|
||||
it(op + ' operation, file', function (done) {
|
||||
it(`${op} operation, file`, function (done) {
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(320, 240)
|
||||
.boolean(fixtures.inputJpgBooleanTest, op)
|
||||
@@ -26,11 +24,11 @@ describe('Boolean operation between two images', function () {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(320, info.width);
|
||||
assert.strictEqual(240, info.height);
|
||||
fixtures.assertSimilar(fixtures.expected('boolean_' + op + '_result.jpg'), data, done);
|
||||
fixtures.assertSimilar(fixtures.expected(`boolean_${op}_result.jpg`), data, done);
|
||||
});
|
||||
});
|
||||
|
||||
it(op + ' operation, buffer', function (done) {
|
||||
it(`${op} operation, buffer`, function (done) {
|
||||
sharp(fixtures.inputJpg)
|
||||
.resize(320, 240)
|
||||
.boolean(inputJpgBooleanTestBuffer, op)
|
||||
@@ -38,11 +36,11 @@ describe('Boolean operation between two images', function () {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(320, info.width);
|
||||
assert.strictEqual(240, info.height);
|
||||
fixtures.assertSimilar(fixtures.expected('boolean_' + op + '_result.jpg'), data, done);
|
||||
fixtures.assertSimilar(fixtures.expected(`boolean_${op}_result.jpg`), data, done);
|
||||
});
|
||||
});
|
||||
|
||||
it(op + ' operation, raw', function (done) {
|
||||
it(`${op} operation, raw`, function (done) {
|
||||
sharp(fixtures.inputJpgBooleanTest)
|
||||
.raw()
|
||||
.toBuffer(function (err, data, info) {
|
||||
@@ -54,7 +52,7 @@ describe('Boolean operation between two images', function () {
|
||||
if (err) throw err;
|
||||
assert.strictEqual(320, info.width);
|
||||
assert.strictEqual(240, info.height);
|
||||
fixtures.assertSimilar(fixtures.expected('boolean_' + op + '_result.jpg'), data, done);
|
||||
fixtures.assertSimilar(fixtures.expected(`boolean_${op}_result.jpg`), data, done);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user