16 lines
536 B
JavaScript
16 lines
536 B
JavaScript
#!/usr/bin/env node
|
|||
|
|
/** Run: node scripts/test-assistant.mjs */
|
||
|
|
import { spawnSync } from "node:child_process";
|
||
|
|
import path from "node:path";
|
||
|
|
import { fileURLToPath } from "node:url";
|
||
|
|
|
||
|
|
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||
|
|
const testFile = path.join(root, "apps/web/src/lib/assistant/assistant.test.ts");
|
||
|
|
|
||
|
|
const result = spawnSync(
|
||
|
|
process.execPath,
|
||
|
|
["--experimental-strip-types", "--test", testFile],
|
||
|
|
{ cwd: root, stdio: "inherit", env: process.env }
|
||
|
|
);
|
||
|
|
process.exit(result.status ?? 1);
|