mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-25 03:45:46 -06:00
test: note wizard finalize calls
This commit is contained in:
@@ -253,7 +253,7 @@ function expectNoteContains(
|
||||
title: string,
|
||||
): void {
|
||||
const calls = vi.mocked(prompter.note).mock.calls;
|
||||
expect(calls.some((call) => call[0].includes(expected) && call[1] === title)).toBe(true);
|
||||
expect(calls.filter((call) => call[0].includes(expected) && call[1] === title)).not.toEqual([]);
|
||||
}
|
||||
|
||||
function expectNoteTitleNotCalled(
|
||||
@@ -261,7 +261,7 @@ function expectNoteTitleNotCalled(
|
||||
title: string,
|
||||
): void {
|
||||
const calls = vi.mocked(prompter.note).mock.calls;
|
||||
expect(calls.every((call) => call[1] !== title)).toBe(true);
|
||||
expect(calls.filter((call) => call[1] === title)).toEqual([]);
|
||||
}
|
||||
|
||||
describe("finalizeSetupWizard", () => {
|
||||
@@ -833,6 +833,6 @@ describe("finalizeSetupWizard", () => {
|
||||
runtime: createRuntime(),
|
||||
});
|
||||
|
||||
expect(note.mock.calls.every((call) => call[1] !== "Codex native search")).toBe(true);
|
||||
expect(note.mock.calls.filter((call) => call[1] === "Codex native search")).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user