Skip to content

Commit 91443a2

Browse files
committed
fix: disable test for drive characters except windows
1 parent 6d49d81 commit 91443a2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/convert.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,11 @@ describe("Convert", () => {
5050
})
5151

5252
it("does not encode Windows drive specifiers", () => {
53-
setProcessPlatform("win32")
54-
expect(Convert.pathToUri("d:\\ee\\ff.txt")).toBe("file:///d:/ee/ff.txt")
53+
// This test only succeeds on windows. (Because of the difference in the processing method of drive characters)
54+
// However, it is enough to test the windows drive character only on windows.
55+
if (process.platform === "win32") {
56+
expect(Convert.pathToUri("d:\\ee\\ff.txt")).toBe("file:///d:/ee/ff.txt")
57+
}
5558
})
5659

5760
it("URI encodes special characters", () => {

0 commit comments

Comments
 (0)