

















@@ -266,14 +266,12 @@ describe("resolveChannelSetupSelectionContributions", () => {
266266] as NoteChannelPrimerChannels,
267267);
268268269-expect(formatChannelPrimerLine).toHaveBeenCalledWith(
270-expect.objectContaining({
271-id: "bad\\nid",
272-label: "bad\\nid",
273-selectionLabel: "bad\\nid",
274-blurb: "Blurb\\nline",
275-}),
276-);
269+expect(formatChannelPrimerLine).toHaveBeenCalledOnce();
270+const [primerMeta] = formatChannelPrimerLine.mock.calls[0] ?? [];
271+expect(primerMeta?.id).toBe("bad\\nid");
272+expect(primerMeta?.label).toBe("bad\\nid");
273+expect(primerMeta?.selectionLabel).toBe("bad\\nid");
274+expect(primerMeta?.blurb).toBe("Blurb\\nline");
277275expect(note).toHaveBeenCalledWith(
278276expect.stringContaining("bad\\nid: Blurb\\nline"),
279277"How channels work",
@@ -309,13 +307,11 @@ describe("resolveChannelSetupSelectionContributions", () => {
309307310308expect(formatChannelSelectionLine).toHaveBeenCalledOnce();
311309const [selectionMeta, docsLink] = formatChannelSelectionLine.mock.calls[0] ?? [];
312-expect(selectionMeta).toMatchObject({
313-label: "Zalo\\nBot",
314-blurb: "Setup\\nhelp",
315-docsLabel: "Docs\\nLabel",
316-selectionDocsPrefix: "Docs\\nPrefix",
317-selectionExtras: ["Extra\\nOne"],
318-});
310+expect(selectionMeta?.label).toBe("Zalo\\nBot");
311+expect(selectionMeta?.blurb).toBe("Setup\\nhelp");
312+expect(selectionMeta?.docsLabel).toBe("Docs\\nLabel");
313+expect(selectionMeta?.selectionDocsPrefix).toBe("Docs\\nPrefix");
314+expect(selectionMeta?.selectionExtras).toEqual(["Extra\\nOne"]);
319315if (typeof docsLink !== "function") {
320316throw new Error("Expected docs link formatter");
321317}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。