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

@@ -55,7 +55,7 @@ const interpolators = {
let versions = {
vips: libvipsVersion.semver
};
/* istanbul ignore next */
/* node:coverage ignore next 15 */
if (!libvipsVersion.isGlobal) {
if (!libvipsVersion.isWasm) {
try {
@@ -73,7 +73,7 @@ if (!libvipsVersion.isGlobal) {
}
versions.sharp = require('../package.json').version;
/* istanbul ignore next */
/* node:coverage ignore next 5 */
if (versions.heif && format.heif) {
// Prebuilt binaries provide AV1
format.heif.input.fileSuffix = ['.avif'];
@@ -148,7 +148,7 @@ cache(true);
function concurrency (concurrency) {
return sharp.concurrency(is.integer(concurrency) ? concurrency : null);
}
/* istanbul ignore next */
/* node:coverage ignore next 7 */
if (detectLibc.familySync() === detectLibc.GLIBC && !sharp._isUsingJemalloc()) {
// Reduce default concurrency to 1 when using glibc memory allocator
sharp.concurrency(1);