Files
wehub-resource-sync f1ba9c6c36
/ test (push) Failing after 1s
/ build-and-push-to-ghcr (push) Has been skipped
chore: import upstream snapshot with attribution
2026-07-13 12:23:39 +08:00

28 lines
655 B
TypeScript

import { run } from 'node:test';
import { spec } from 'node:test/reporters';
import { glob } from 'node:fs';
import path from 'path';
process.env.NODE_ENV = 'test';
async function main() {
const files = await new Promise<string[]>((resolve, reject) => {
glob(path.join(__dirname, 'unit', '*.test.js'), (err, found) => {
if (err) reject(err);
else resolve(found);
});
});
const stream = run({
files,
concurrency: false,
timeout: 10_000,
isolation: 'none',
forceExit: true,
watch: false,
});
stream.compose(spec).pipe(process.stdout);
}
main();