Something went wrong. Try again.
Something went wrong. Try again.
1234567891011121314151617181920212223import { readdirSync } from 'node:fs';import { spawnSync } from 'node:child_process';import { fileURLToPath } from 'node:url';
const root = fileURLToPath(new URL('../', import.meta.url));const tests = readdirSync(new URL('../tests/', import.meta.url)) .filter((name) => /^test-.*\.mjs$/.test(name)) .sort();for (const test of tests) { console.log(`\nRunning ${test}`); const result = spawnSync( process.execPath, [fileURLToPath(new URL(`../tests/${test}`, import.meta.url))], { cwd: root, stdio: 'inherit', }, ); if (result.error) throw result.error; if (result.status !== 0) process.exit(result.status ?? 1);}console.log(`\nAll ${tests.length} test suites passed.`);