mirror of https://git.tuxpa.in/a/code-server.git
12 lines
429 B
TypeScript
12 lines
429 B
TypeScript
import { relativeRoot } from "../../../src/node/http"
|
|
|
|
describe("http", () => {
|
|
it("should construct a relative path to the root", () => {
|
|
expect(relativeRoot("/")).toStrictEqual(".")
|
|
expect(relativeRoot("/foo")).toStrictEqual(".")
|
|
expect(relativeRoot("/foo/")).toStrictEqual("./..")
|
|
expect(relativeRoot("/foo/bar ")).toStrictEqual("./..")
|
|
expect(relativeRoot("/foo/bar/")).toStrictEqual("./../..")
|
|
})
|
|
})
|