This commit is contained in:
2026-10-29 11:45:51 -04:00
parent b3a1179703
commit b427fa4217
35 changed files with 469 additions and 158 deletions
+18
View File
@@ -0,0 +1,18 @@
import { readdirSync } from 'node:fs';
import { spawnSync } from 'node:child_process';
import { fileURLToPath } from 'node:url';
import { join } from 'node:path';
const testDirectory = fileURLToPath(new URL('../tests/', import.meta.url));
const files = readdirSync(testDirectory)
.filter(name => name.endsWith('.test.ts'))
.sort()
.map(name => join(testDirectory, name));
if (!files.length) throw new Error('No test files found.');
const result = spawnSync(process.execPath, ['--import', 'tsx', '--test', ...files], {
stdio: 'inherit',
env: { ...process.env, WIKIDECK_NETWORK: 'testnet', WIKIDECK_GENESIS_TIME: '1792411200' },
});
if (result.error) throw result.error;
process.exitCode = result.status ?? 1;