mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Migrate from mocha to Node.js native test runner
Includes coverage reports when using Node.js 22 onwards
This commit is contained in:
@@ -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 semver = require('semver');
|
||||
const sharp = require('../../');
|
||||
|
||||
describe('Utilities', function () {
|
||||
describe('Cache', function () {
|
||||
it('Can be disabled', function (done) {
|
||||
it('Can be disabled', function (_t, done) {
|
||||
const check = setInterval(() => {
|
||||
const cache = sharp.cache(false);
|
||||
const empty =
|
||||
@@ -75,7 +76,7 @@ describe('Utilities', function () {
|
||||
});
|
||||
|
||||
describe('Counters', function () {
|
||||
it('Have zero value at rest', (done) => {
|
||||
it('Have zero value at rest', (_t, done) => {
|
||||
queueMicrotask(() => {
|
||||
const counters = sharp.counters();
|
||||
assert.strictEqual(0, counters.queue);
|
||||
|
||||
Reference in New Issue
Block a user