refactor: move mergePaths() to utils.ts (#2905)
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { expect } from "@std/expect";
|
||||
import { mergePaths } from "./utils.ts";
|
||||
|
||||
Deno.test("mergePaths", () => {
|
||||
expect(mergePaths("", "")).toEqual("");
|
||||
expect(mergePaths("/", "/foo")).toEqual("/foo");
|
||||
expect(mergePaths("/*", "/foo")).toEqual("/foo");
|
||||
expect(mergePaths("/foo/bar", "/baz")).toEqual("/foo/bar/baz");
|
||||
expect(mergePaths("/foo/bar/", "/baz")).toEqual("/foo/bar/baz");
|
||||
expect(mergePaths("/foo/bar", "baz")).toEqual("/foo/bar/baz");
|
||||
});
|
||||
Reference in New Issue
Block a user