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:
@ -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"
|
||||
|
||||
|
Reference in New Issue
Block a user