Download web/scripts/test.mjs from loveaa/OneAlign: direct link, hf CLI and curl.
- Browser
- Download file 840 Bytes
-
https://huggingface.co/spaces/loveaa/OneAlign/resolve/main/web/scripts/test.mjs
- Command line
-
hf download hf://spaces/loveaa/OneAlign/web/scripts/test.mjs
-
curl -L -o test.mjs https://huggingface.co/spaces/loveaa/OneAlign/resolve/main/web/scripts/test.mjs
840 Bytes
| 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 | |