Archived
1
0

Refactor vscode endpoints to use fork directly.

This commit is contained in:
Teffen Ellis
2021-09-29 23:14:56 -04:00
committed by Teffen
parent beebf53adc
commit d8c344beda
52 changed files with 502 additions and 3406 deletions

View File

@ -457,31 +457,6 @@ describe("escapeHtml", () => {
})
})
describe("pathToFsPath", () => {
it("should convert a path to a file system path", () => {
expect(util.pathToFsPath("/foo/bar/baz")).toBe("/foo/bar/baz")
})
it("should lowercase drive letter casing by default", () => {
expect(util.pathToFsPath("/C:/far/boo")).toBe("c:/far/boo")
})
it("should keep drive letter casing when set to true", () => {
expect(util.pathToFsPath("/C:/far/bo", true)).toBe("C:/far/bo")
})
it("should replace / with \\ on Windows", () => {
const ORIGINAL_PLATFORM = process.platform
Object.defineProperty(process, "platform", {
value: "win32",
})
expect(util.pathToFsPath("/C:/far/boo")).toBe("c:\\far\\boo")
Object.defineProperty(process, "platform", {
value: ORIGINAL_PLATFORM,
})
})
})
describe("isFile", () => {
const testDir = path.join(tmpdir, "tests", "isFile")
let pathToFile = ""