test: note wizard finalize calls · openclaw/openclaw@168bb4f
shakkernerd
·
2026-05-13
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -253,15 +253,15 @@ function expectNoteContains(
|
253 | 253 | title: string, |
254 | 254 | ): void { |
255 | 255 | const calls = vi.mocked(prompter.note).mock.calls; |
256 | | -expect(calls.some((call) => call[0].includes(expected) && call[1] === title)).toBe(true); |
| 256 | +expect(calls.filter((call) => call[0].includes(expected) && call[1] === title)).not.toEqual([]); |
257 | 257 | } |
258 | 258 | |
259 | 259 | function expectNoteTitleNotCalled( |
260 | 260 | prompter: ReturnType<typeof buildWizardPrompter>, |
261 | 261 | title: string, |
262 | 262 | ): void { |
263 | 263 | const calls = vi.mocked(prompter.note).mock.calls; |
264 | | -expect(calls.every((call) => call[1] !== title)).toBe(true); |
| 264 | +expect(calls.filter((call) => call[1] === title)).toEqual([]); |
265 | 265 | } |
266 | 266 | |
267 | 267 | describe("finalizeSetupWizard", () => { |
@@ -833,6 +833,6 @@ describe("finalizeSetupWizard", () => {
|
833 | 833 | runtime: createRuntime(), |
834 | 834 | }); |
835 | 835 | |
836 | | -expect(note.mock.calls.every((call) => call[1] !== "Codex native search")).toBe(true); |
| 836 | +expect(note.mock.calls.filter((call) => call[1] === "Codex native search")).toEqual([]); |
837 | 837 | }); |
838 | 838 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。