diff --git a/packages/cli/test/init-no-interactive.test.ts b/packages/cli/test/init-no-interactive.test.ts index 85bdb6a1..960e6a5c 100644 --- a/packages/cli/test/init-no-interactive.test.ts +++ b/packages/cli/test/init-no-interactive.test.ts @@ -665,7 +665,7 @@ describe("taskless init (the batch install)", () => { ); expect(boxed).not.toContain(".claude/skills/taskless"); expect(stdout.indexOf("COMMIT BEFORE YOU START YOUR AGENT")).toBeLessThan( - stdout.indexOf("ask to onboard with Taskless") + stdout.indexOf(ONBOARD_PROMPT) ); }); diff --git a/packages/cli/test/init-telemetry-notice.test.ts b/packages/cli/test/init-telemetry-notice.test.ts index 5761af1f..3834e7f7 100644 --- a/packages/cli/test/init-telemetry-notice.test.ts +++ b/packages/cli/test/init-telemetry-notice.test.ts @@ -19,6 +19,7 @@ vi.mock("../src/telemetry", () => ({ })); const { initCommand } = await import("../src/commands/init"); +const { getOnboardTrailer } = await import("../src/commands/onboard"); interface RunnableCommand { run: (context: { @@ -68,7 +69,9 @@ describe("init tells the user about telemetry", () => { expect(output.filter((line) => line === "")).toHaveLength( 1 ); - expect(output.at(-1)).toMatch(/^In your AI tool, /); + // One `console.log` call per entry, and the trailer is a single two-line + // call, so the last entry is the whole trailer. + expect(output.at(-1)).toBe(getOnboardTrailer()); expect(isTelemetryEnabled).toHaveBeenCalledWith(cwd); });