mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 10:23:39 -06:00
Move all [script("bun")] blocks into standalone TypeScript files under
scripts/ with shared utilities in scripts/lib/. The Justfile is now ~40
lines of thin `bun scripts/*.ts` wrappers.
Shared code consolidated into two lib files:
- lib/proc.ts: process spawning (run, spawnCollect, raceInOrder, ProcessGroup)
- lib/fmt.ts: color output, elapsed timers, reusable flag parser
21 lines
574 B
TypeScript
21 lines
574 B
TypeScript
/**
|
|
* Run project tests.
|
|
*
|
|
* Usage: bun scripts/test.ts [rust|web|<nextest filter args>]
|
|
*/
|
|
|
|
import { run } from "./lib/proc";
|
|
|
|
const input = process.argv.slice(2).join(" ").trim();
|
|
|
|
if (input === "web") {
|
|
run(["bun", "run", "--cwd", "web", "test"]);
|
|
} else if (input === "rust") {
|
|
run(["cargo", "nextest", "run", "-E", "not test(export_bindings)"]);
|
|
} else if (input === "") {
|
|
run(["cargo", "nextest", "run", "-E", "not test(export_bindings)"]);
|
|
run(["bun", "run", "--cwd", "web", "test"]);
|
|
} else {
|
|
run(["cargo", "nextest", "run", ...input.split(/\s+/)]);
|
|
}
|