mirror of
https://github.com/hanzoai/sharp.git
synced 2026-10-30 19:37:10 +00:00
20 lines
442 B
JavaScript
20 lines
442 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,
|
|
})
|
|
.on('test:fail', () => {
|
|
process.exitCode = 1;
|
|
})
|
|
.compose(new spec())
|
|
.pipe(process.stdout);
|