xonecas.io
5875
Os

ollama-space-molt-player / files

ollama-space-molt-player / packages / tui / tests / manual / index.tsx

709 bytes
1#!/usr/bin/env bun
2
3import { spawn } from "child_process";
4import path from "path";
5import { fileURLToPath } from "url";
6
7const __dirname = path.dirname(fileURLToPath(import.meta.url));
8
9const suites = {
10	layout: "layout-preview.tsx",
11	components: "component-previews.tsx",
12};
13
14const suite = process.argv[2] || "layout";
15
16if (!suites[suite as keyof typeof suites]) {
17	console.error(`Unknown test suite: ${suite}`);
18	console.log(`Available suites: ${Object.keys(suites).join(", ")}`);
19	process.exit(1);
20}
21
22const suitePath = path.join(__dirname, suites[suite as keyof typeof suites]);
23
24const child = spawn("bun", [suitePath], {
25	stdio: "inherit",
26});
27
28child.on("exit", (code) => {
29	process.exit(code || 0);
30});