Versions 286 to 287
new file, 140 lines
1+// Local projects (abso init --local): a project whose history is in a store on this machine, answered by the open
2+// server's own code in the client's process. Every test here runs with fetch replaced by one that throws, so any
4+
6+import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
12+
19+
33+
35+const env = () => ({ ABSO_STORE: store, ABSO_SERVERS_FILE: "no-servers.json", ABSO_HOOK_FORCE: "1" });
36+async function run(cwd: string, ...argv: string[]): Promise<{ exit: number; out: string; err: string }> {
41+
48+
54+ assert.match(r.out, /Created project demo at version 0 from 2 text files/, "a.txt and the starting .absoignore");
61+ assert.equal(config.store, undefined, "the store came from ABSO_STORE, so the folder doesn't name it");
63+
75+
88+
95+
106+
108+ it("--store inside the folder is kept in its settings and left out of its files", async () => {
112+ const r = await run(dir, "init", "--local", "--project", "beside", "--agent", "a", "--store", ".abso-store");
115+ assert.equal(JSON.parse(readFileSync(join(stateDir(dir), "config.json"), "utf8")).store, join(dir, ".abso-store"));
122+
126+ const both = await run(dir, "init", "--local", "--server", "https://abso.test", "--project", "p");
131+
- MCP
- compare on this site's /mcp
- CLI
- abso diff 286 287 client/test/local.test.ts --json
- JSON
- /christopher/abso-core/compare/286..287?file=client%2Ftest%2Flocal.test.ts&format=json