@@ -43,10 +43,18 @@ describe("setupCommand", () => {
|
43 | 43 | await setupCommand({ workspace }, runtime, deps); |
44 | 44 | |
45 | 45 | const configPath = path.join(home, ".openclaw", "openclaw.json"); |
46 | | -const raw = await fs.readFile(configPath, "utf-8"); |
| 46 | +const raw = JSON.parse(await fs.readFile(configPath, "utf-8")) as unknown; |
47 | 47 | |
48 | | -expect(raw).toContain('"mode": "local"'); |
49 | | -expect(raw).toContain('"workspace"'); |
| 48 | +expect(raw).toStrictEqual({ |
| 49 | +agents: { |
| 50 | +defaults: { |
| 51 | + workspace, |
| 52 | +}, |
| 53 | +}, |
| 54 | +gateway: { |
| 55 | +mode: "local", |
| 56 | +}, |
| 57 | +}); |
50 | 58 | }); |
51 | 59 | }); |
52 | 60 | |
@@ -61,13 +69,13 @@ describe("setupCommand", () => {
|
61 | 69 | |
62 | 70 | await setupCommand(undefined, runtime, deps); |
63 | 71 | |
64 | | -const logs = runtime.log.mock.calls.map((call) => String(call[0])).join("\n"); |
65 | | -expect(logs).toContain( |
| 72 | +expect(runtime.log.mock.calls.map((call) => String(call[0])).slice(-5)).toStrictEqual([ |
| 73 | + "", |
66 | 74 | "Setup complete: config, workspace, and session directories are ready.", |
67 | | -); |
68 | | -expect(logs).toContain("openclaw onboard"); |
69 | | -expect(logs).toContain("openclaw configure"); |
70 | | -expect(logs).toContain("openclaw channels add"); |
| 75 | + "Next guided path: openclaw onboard.", |
| 76 | + "Next targeted changes: openclaw configure for models, channels, Gateway, plugins, skills, and health checks.", |
| 77 | + "Add a chat channel later: openclaw channels add.", |
| 78 | +]); |
71 | 79 | }); |
72 | 80 | }); |
73 | 81 | |
|