File size: 840 Bytes
90d354b 133b124 90d354b | 1 2 3 4 5 6 7 8 9 10 11 | import { build } from 'esbuild'
import { spawnSync } from 'node:child_process'
import fs from 'node:fs'
fs.mkdirSync('.local/tests',{recursive:true})
for (const [input,name] of [['src/lib/domain.ts','domain'],['src/lib/engine.ts','engine'],['tests/render-entry.tsx','render']]) {
await build({entryPoints:[input],outfile:'.local/tests/'+name+'.mjs',bundle:true,platform:'node',format:'esm',packages:'external',jsx:'automatic',logLevel:'silent'})
}
const result=spawnSync(process.execPath,['--test','--test-concurrency=1','tests/domain.test.mjs','tests/metrics.test.mjs','tests/server.test.mjs','tests/render.test.mjs','tests/contract.test.mjs','tests/plan-checks.test.mjs','tests/grounded.test.mjs','tests/cloud.test.mjs','tests/app-api.test.mjs','tests/observation-policy.test.mjs'],{stdio:'inherit'})
process.exitCode=result.status||0
|