





















@@ -51,23 +51,19 @@ describe("update cli option collisions", () => {
5151name: "forwards parent-captured --json/--timeout to `update status`",
5252argv: ["update", "status", "--json", "--timeout", "9"],
5353assert: () => {
54-expect(updateStatusCommand).toHaveBeenCalledWith(
55-expect.objectContaining({
56-json: true,
57-timeout: "9",
58-}),
59-);
54+expect(updateStatusCommand).toHaveBeenCalledTimes(1);
55+const [opts] = updateStatusCommand.mock.calls[0] ?? [];
56+expect((opts as { json?: boolean; timeout?: string } | undefined)?.json).toBe(true);
57+expect((opts as { json?: boolean; timeout?: string } | undefined)?.timeout).toBe("9");
6058},
6159},
6260{
6361name: "forwards parent-captured --timeout to `update wizard`",
6462argv: ["update", "wizard", "--timeout", "13"],
6563assert: () => {
66-expect(updateWizardCommand).toHaveBeenCalledWith(
67-expect.objectContaining({
68-timeout: "13",
69-}),
70-);
64+expect(updateWizardCommand).toHaveBeenCalledTimes(1);
65+const [opts] = updateWizardCommand.mock.calls[0] ?? [];
66+expect((opts as { timeout?: string } | undefined)?.timeout).toBe("13");
7167},
7268},
7369])("$name", async ({ argv, assert }) => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。