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

Commit

Permalink
Failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ptgott committed Jul 16, 2024
1 parent 229d29d commit 71c12be
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions uvu-tests/config-docs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,42 @@ title: Get Started with DB RBAC
}
);

Suite("generates four levels of the sidebar", () => {
const files = {
"/docs/pages/database-access/guides/guides.mdx": `---
title: Database Access Guides
---`,
"/docs/pages/database-access/guides/deployment/kubernetes.mdx": `---
title: Database Access Kubernetes Deployment
---`,
"/docs/pages/database-access/guides/deployment/deployment.mdx": `---
title: Database Access Deployment Guides
---`,
};

const expected = [
{
title: "Database Access Guides",
slug: "/database-access/guides/",
entries: [
{
title: "Database Access Deployment Guides",
slug: "/database-access/guides/deployment/",
entries: [
{
title: "Database Access Kubernetes Deployment",
slug: "/database-access/guides/deployment/kubernetes/",
},
],
},
],
},
];

const vol = Volume.fromJSON(files);
const fs = createFsFromVolume(vol);
let actual = generateNavPaths(fs, "/docs/pages/database-access");
assert.equal(actual, expected);
});

Suite.run();

0 comments on commit 71c12be

Please sign in to comment.