mirror of
https://github.com/vercel/eve.git
synced 2026-09-20 05:35:39 +08:00
bf04750363
Signed-off-by: John Pham <john.pham@vercel.com>
21 lines
635 B
TypeScript
21 lines
635 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { getMarkdownRequestedPath } from "./markdown-path";
|
|
|
|
describe("getMarkdownRequestedPath", () => {
|
|
it("restores flattened docs paths", () => {
|
|
expect(getMarkdownRequestedPath({ slug: ["environment-variables"] })).toBe(
|
|
"/docs/environment-variables",
|
|
);
|
|
});
|
|
|
|
it("preserves integration paths", () => {
|
|
expect(getMarkdownRequestedPath({ slug: ["integrations", "vercel"] })).toBe(
|
|
"/integrations/vercel",
|
|
);
|
|
});
|
|
|
|
it("maps the shared route root to the docs root", () => {
|
|
expect(getMarkdownRequestedPath({ slug: [] })).toBe("/docs");
|
|
});
|
|
});
|