mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 11:20:43 +00:00
test: tighten docs link audit invocations
This commit is contained in:
@@ -177,10 +177,10 @@ describe("docs-link-audit", () => {
|
||||
expect(invocation).toEqual({
|
||||
command: "pnpm",
|
||||
args: ["dlx", "mint", "broken-links", "--check-anchors"],
|
||||
options: expect.objectContaining({
|
||||
stdio: "inherit",
|
||||
options: {
|
||||
cwd: anchorDocsDir,
|
||||
}),
|
||||
stdio: "inherit",
|
||||
},
|
||||
});
|
||||
expect(cleanedDir).toBe(anchorDocsDir);
|
||||
});
|
||||
@@ -212,7 +212,10 @@ describe("docs-link-audit", () => {
|
||||
expect(exitCode).toBe(0);
|
||||
expect(invocations).toHaveLength(2);
|
||||
const [versionCheck, linkCheck] = invocations;
|
||||
expect(versionCheck).toMatchObject({
|
||||
if (!versionCheck || !linkCheck) {
|
||||
throw new Error("Expected Mintlify wrapper invocations");
|
||||
}
|
||||
expect(versionCheck).toEqual({
|
||||
command: "fnm",
|
||||
args: [
|
||||
"exec",
|
||||
@@ -221,15 +224,13 @@ describe("docs-link-audit", () => {
|
||||
"-e",
|
||||
"process.exit(Number(process.versions.node.split('.')[0]) === 22 ? 0 : 1)",
|
||||
],
|
||||
options: { stdio: "ignore" },
|
||||
options: { cwd: anchorDocsDir, stdio: "ignore" },
|
||||
});
|
||||
expect(linkCheck).toMatchObject({
|
||||
expect(linkCheck).toEqual({
|
||||
command: "fnm",
|
||||
args: ["exec", "--using=22", "pnpm", "dlx", "mint", "broken-links", "--check-anchors"],
|
||||
options: { stdio: "inherit" },
|
||||
options: { cwd: anchorDocsDir, stdio: "inherit" },
|
||||
});
|
||||
expect(versionCheck.options.cwd).toBe(anchorDocsDir);
|
||||
expect(linkCheck.options.cwd).toBe(anchorDocsDir);
|
||||
expect(cleanedDir).toBe(anchorDocsDir);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user