Skip to content

Commit 1f1ebf2

Browse files
Jasmine ZhangJasmine Zhang
authored andcommitted
test(doctor): satisfy DoctorPrompter mock shape
1 parent d8fbe12 commit 1f1ebf2

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/commands/doctor-completion.test.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,20 @@ describe("shell completion health mapping", () => {
131131
await fs.chmod(profilePath, 0o444);
132132

133133
const prompter = {
134-
shouldRepair: true,
135134
confirm: vi.fn(async () => true),
136135
confirmAutoFix: vi.fn(async () => true),
137136
confirmAggressiveAutoFix: vi.fn(async () => true),
138137
confirmRuntimeRepair: vi.fn(async () => true),
139-
resolveServiceRepairMode: vi.fn(() => ({ shouldRepair: true })),
138+
select: vi.fn(async (_params, fallback) => fallback),
139+
shouldRepair: true,
140+
shouldForce: false,
141+
repairMode: {
142+
shouldRepair: true,
143+
shouldForce: false,
144+
nonInteractive: false,
145+
canPrompt: true,
146+
updateInProgress: false,
147+
},
140148
};
141149

142150
await expect(doctorShellCompletion({} as never, prompter)).resolves.toBeUndefined();

0 commit comments

Comments
 (0)