Versions 2 to 318
new file, 174 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+
20+
26+
27+/** A checkout on main with one commit, launch.mjs and a stand-in client/abso.ts that names itself. */
37+ 'console.log("ts " + JSON.stringify(process.argv.slice(2)));\nprocess.exitCode = Number(process.env.FAKE_EXIT ?? 0);\n',
48+
54+
55+function launch(c: { repo: string; home: string }, args: string[], env: Record<string, string> = {}) {
61+
63+
65+ it("runs client/abso.ts when there's no bundle, with the arguments and exit code passed through", () => {
71+
82+
88+
89+ it("falls back to client/abso.ts in the same run when the bundle doesn't load, and writes one line", () => {
103+
112+
113+ it("doesn't run a command twice when it throws a SyntaxError after the bundle started", () => {
121+
124+ const echo = 'let s = "";\nprocess.stdin.on("data", (d) => (s += d)).on("end", () => console.log("got " + s));\n';
136+
144+
157+
166+
- MCP
- compare on this site's /mcp
- CLI
- abso diff 2 318 client/test/launch.test.ts --json
- JSON
- /christopher/abso-core/compare/2..318?file=client%2Ftest%2Flaunch.test.ts&format=json