Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
Add a failing test
Browse files Browse the repository at this point in the history
Also make a minor change to get an unrelated failing test to pass
  • Loading branch information
ptgott committed Oct 17, 2024
1 parent 1ec9d04 commit 05c4ac0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions uvu-tests/config-docs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,29 @@ title: MySQL Guide
}
);

Suite(
"generateNavPaths throws if there is a category page at an incorrect location",
() => {
const files = {
"/docs/pages/database-access/guides/postgres.mdx": `---
title: Postgres Guide
---`,
"/docs/pages/database-access/guides/mysql.mdx": `---
title: MySQL Guide
---`,
"/docs/pages/database-access/guides.mdx": `---
title: "Database Access Guides"
---`,
};

const vol = Volume.fromJSON(files);
const fs = createFsFromVolume(vol);
assert.throws(() => {
generateNavPaths(fs, "/docs/pages/database-access");
}, "database-access/guides/guides.mdx");
}
);

Suite("generateNavPaths shows third-level pages on the sidebar", () => {
const files = {
"/docs/pages/database-access/guides/guides.mdx": `---
Expand Down
2 changes: 1 addition & 1 deletion uvu-tests/remark-includes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ Suite("Throws an error if a variable is unresolved and has no default", () => {
assert.equal(out.messages.length, 1);
assert.equal(
out.messages[0].reason,
"The following partial parameters were not assigned and have no default value: {{ unsupported }}"
"install-version.mdx: the following partial parameters were not assigned and have no default value: {{ unsupported }}"
);
});

Expand Down

0 comments on commit 05c4ac0

Please sign in to comment.