Archived
1
0

Remove humanPath (#6404)

The tilde is ambiguous and it can be helpful to know exactly what paths
code-server is trying to use, especially if it is running as a different
user than you expected.
This commit is contained in:
Asher
2023-08-29 15:25:24 -07:00
committed by GitHub
parent eb8099ff89
commit eb498b0d6d
5 changed files with 10 additions and 43 deletions

View File

@ -491,22 +491,6 @@ describe("isDirectory", () => {
})
})
describe("humanPath", () => {
it("should return an empty string if no path provided", () => {
const mockHomedir = "/home/coder"
const actual = util.humanPath(mockHomedir)
const expected = ""
expect(actual).toBe(expected)
})
it("should replace the homedir with ~", () => {
const mockHomedir = "/home/coder"
const path = `${mockHomedir}/code-server`
const actual = util.humanPath(mockHomedir, path)
const expected = "~/code-server"
expect(actual).toBe(expected)
})
})
describe("isWsl", () => {
const testName = "wsl"