






















@@ -177,10 +177,10 @@ describe("docs-link-audit", () => {
177177expect(invocation).toEqual({
178178command: "pnpm",
179179args: ["dlx", "mint", "broken-links", "--check-anchors"],
180-options: expect.objectContaining({
181-stdio: "inherit",
180+options: {
182181cwd: anchorDocsDir,
183-}),
182+stdio: "inherit",
183+},
184184});
185185expect(cleanedDir).toBe(anchorDocsDir);
186186});
@@ -212,7 +212,10 @@ describe("docs-link-audit", () => {
212212expect(exitCode).toBe(0);
213213expect(invocations).toHaveLength(2);
214214const [versionCheck, linkCheck] = invocations;
215-expect(versionCheck).toMatchObject({
215+if (!versionCheck || !linkCheck) {
216+throw new Error("Expected Mintlify wrapper invocations");
217+}
218+expect(versionCheck).toEqual({
216219command: "fnm",
217220args: [
218221"exec",
@@ -221,15 +224,13 @@ describe("docs-link-audit", () => {
221224"-e",
222225"process.exit(Number(process.versions.node.split('.')[0]) === 22 ? 0 : 1)",
223226],
224-options: { stdio: "ignore" },
227+options: { cwd: anchorDocsDir, stdio: "ignore" },
225228});
226-expect(linkCheck).toMatchObject({
229+expect(linkCheck).toEqual({
227230command: "fnm",
228231args: ["exec", "--using=22", "pnpm", "dlx", "mint", "broken-links", "--check-anchors"],
229-options: { stdio: "inherit" },
232+options: { cwd: anchorDocsDir, stdio: "inherit" },
230233});
231-expect(versionCheck.options.cwd).toBe(anchorDocsDir);
232-expect(linkCheck.options.cwd).toBe(anchorDocsDir);
233234expect(cleanedDir).toBe(anchorDocsDir);
234235});
235236});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。