Migrate from mocha to Node.js native test runner

Includes coverage reports when using Node.js 22 onwards
This commit is contained in:
Lovell Fuller
2025-09-21 11:04:55 +01:00
parent c446d743a2
commit f2978651f0
70 changed files with 583 additions and 541 deletions

View File

@@ -1,13 +1,14 @@
// Copyright 2013 Lovell Fuller and others.
// SPDX-License-Identifier: Apache-2.0
const { describe, it } = require('node:test');
const assert = require('node:assert');
const sharp = require('../../');
const fixtures = require('../fixtures');
describe('Convolve', function () {
it('specific convolution kernel 1', function (done) {
it('specific convolution kernel 1', function (_t, done) {
sharp(fixtures.inputPngStripesV)
.convolve({
width: 3,
@@ -29,7 +30,7 @@ describe('Convolve', function () {
});
});
it('specific convolution kernel 2', function (done) {
it('specific convolution kernel 2', function (_t, done) {
sharp(fixtures.inputPngStripesH)
.convolve({
width: 3,
@@ -49,7 +50,7 @@ describe('Convolve', function () {
});
});
it('horizontal Sobel operator', function (done) {
it('horizontal Sobel operator', function (_t, done) {
sharp(fixtures.inputJpg)
.resize(320, 240)
.convolve({