mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-14 11:30:41 +00:00
Wizard: fix CI typing assertions and tool profile guards
This commit is contained in:
@@ -543,8 +543,13 @@ describe("runOnboardingWizard", () => {
|
||||
prompter,
|
||||
);
|
||||
|
||||
const firstWrite = writeConfigFile.mock.calls[0]?.[0] as { tools?: { profile?: string } };
|
||||
expect(firstWrite?.tools?.profile).toBe("coding");
|
||||
expect(writeConfigFile).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
tools: expect.objectContaining({
|
||||
profile: "coding",
|
||||
}),
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
it("preselects existing tools.profile in the onboarding prompt", async () => {
|
||||
@@ -632,7 +637,12 @@ describe("runOnboardingWizard", () => {
|
||||
message: "Tool access profile",
|
||||
}),
|
||||
);
|
||||
const firstWrite = writeConfigFile.mock.calls[0]?.[0] as { tools?: { profile?: string } };
|
||||
expect(firstWrite?.tools?.profile).toBe("messaging");
|
||||
expect(writeConfigFile).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
tools: expect.objectContaining({
|
||||
profile: "messaging",
|
||||
}),
|
||||
}),
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user