mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-26 08:56:22 +02:00
strengthen repo verification and runtime coverage
Add clearer app docs plus targeted desktop, CLI, web, and worker tests so cross-surface regressions are caught earlier and the repo is easier to navigate.
This commit is contained in:
parent
2133d7226f
commit
4239f9f1ef
63 changed files with 3678 additions and 764 deletions
31
apps/cli/test/run-tests.mjs
Normal file
31
apps/cli/test/run-tests.mjs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
import { mkdtemp, rm } from "node:fs/promises";
|
||||
import { tmpdir } from "node:os";
|
||||
import path from "node:path";
|
||||
import { spawn } from "node:child_process";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
const packageDir = path.resolve(__dirname, "..");
|
||||
const tempRoot = await mkdtemp(path.join(tmpdir(), "rowboat-cli-test-"));
|
||||
const testWorkDir = path.join(tempRoot, "workspace");
|
||||
|
||||
try {
|
||||
const exitCode = await new Promise((resolve, reject) => {
|
||||
const child = spawn(process.execPath, ["--test", "./test/repos.test.mjs", "./test/server.test.mjs"], {
|
||||
cwd: packageDir,
|
||||
stdio: "inherit",
|
||||
env: {
|
||||
...process.env,
|
||||
ROWBOAT_WORKDIR: testWorkDir,
|
||||
},
|
||||
});
|
||||
|
||||
child.on("error", reject);
|
||||
child.on("exit", (code) => resolve(code ?? 1));
|
||||
});
|
||||
|
||||
process.exitCode = Number(exitCode);
|
||||
} finally {
|
||||
await rm(tempRoot, { recursive: true, force: true });
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue