Skip to content

abso-core

Public

abso is version control for agents: the client, the engine and a server you can run on your own Cloudflare account.

Check passed
MCP
code on this site's /mcp
CLI
none: the JSON below is the answer
JSON
/christopher/abso-core/files/client/test-mods.ts?format=json
36 linesFirst import 100%Last change First import in version 0, 1 version changed it
1// Run the two mods' tests in Claude Code's plugin test kit:
2//
3// node client/test-mods.ts
4//
5// `claude plugin test <dir>` runs every *.test.ts under dir, and the avcs
6// mod's plugin folder is all of client/ (its tests and the view's included),
7// so each mod is installed into a folder of its own with its test, and the kit
8// runs there. Needs the claude CLI.
9
10import { spawnSync } from "node:child_process";
11import { copyFileSync, mkdtempSync, rmSync } from "node:fs";
12import { tmpdir } from "node:os";
13import { dirname, join } from "node:path";
14import { fileURLToPath } from "node:url";
16const here = dirname(fileURLToPath(import.meta.url));
17const MODS = [
18 { name: "avcs", install: "install-mod.ts", test: "hooks/register.test.ts", from: here },
19 { name: "avcs-view", install: "install-view.ts", test: "hooks/register.test.ts", from: join(here, "view") },
20];
22let failed = false;
23for (const mod of MODS) {
24 const dir = mkdtempSync(join(tmpdir(), `${mod.name}-mod-`));
25 try {
26 // --unchecked: the install's own check would run these same tests first.
27 spawnSync(process.execPath, [join(here, mod.install), dir, "--unchecked"], { stdio: "ignore" });
28 copyFileSync(join(mod.from, ...mod.test.split("/")), join(dir, ...mod.test.split("/")));
29 console.log(`--- ${mod.name}`);
30 const r = spawnSync("claude", ["plugin", "test", dir], { stdio: "inherit", shell: process.platform === "win32" });
31 if (r.status !== 0) failed = true;
32 } finally {
33 rmSync(dir, { recursive: true, force: true });
34 }
36process.exit(failed ? 1 : 0);