Versions 37 to 38
new file, 137 lines
2+// Each test runs the real launch.mjs from a throwaway git checkout, with a stand-in client, and a home of its own.
3+
6+import { copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, writeFileSync } from "node:fs";
10+
12+
13+/** A checkout on main with one commit, launch.mjs and a stand-in client/abso.ts that names itself. */
22+ 'console.log("ts " + JSON.stringify(process.argv.slice(2)));\nprocess.exitCode = Number(process.env.FAKE_EXIT ?? 0);\n',
33+
39+
40+function launch(c: { repo: string; home: string }, args: string[], env: Record<string, string> = {}) {
46+
48+
50+ it("runs client/abso.ts when there's no bundle, with the arguments and exit code passed through", () => {
56+
67+
73+
74+ it("falls back to client/abso.ts in the same run when the bundle doesn't load, and writes one line", () => {
88+
97+
106+
109+ const echo = 'let s = "";\nprocess.stdin.on("data", (d) => (s += d)).on("end", () => console.log("got " + s));\n';
121+
129+
- MCP
- compare on this site's /mcp
- CLI
- abso diff 37 38 client/test/launch.test.ts --json
- JSON
- /christopher/abso-core/compare/37..38?file=client%2Ftest%2Flaunch.test.ts&format=json