silverbullet/lib/path.test.ts

12 lines
373 B
TypeScript
Raw Normal View History

import { assertEquals } from "$lib/test_deps.ts";
2023-07-07 19:09:44 +08:00
import { folderName, resolve } from "./path.ts";
Deno.test("Path functions", () => {
assertEquals(folderName(""), "");
assertEquals(folderName("page"), "");
assertEquals(folderName("folder/page"), "folder");
assertEquals(resolve("", "page"), "page");
assertEquals(resolve("folder", "page"), "folder/page");
});