sharp/test/unit.mjs
Lovell Fuller f2978651f0 Migrate from mocha to Node.js native test runner
Includes coverage reports when using Node.js 22 onwards
2025-09-21 12:03:27 +01:00

17 lines
384 B
JavaScript

import { readdir } from 'node:fs/promises';
import { run } from 'node:test';
import { spec } from 'node:test/reporters';
const files = (await readdir('./test/unit')).map((f) => `./test/unit/${f}`);
run({
files,
concurrency: true,
timeout: 60000,
coverage: true,
coverageIncludeGlobs: ['lib/*.js'],
branchCoverage: 100,
})
.compose(new spec())
.pipe(process.stdout);