This repository was archived by the owner on Jun 5, 2019. It is now read-only.
This repository was archived by the owner on Jun 5, 2019. It is now read-only.
Jest fails when running on Windows due to path separator difference #121
Closed
Description
FAIL src\main-window\load-url.test.ts
● loads from electron
expect(jest.fn()).toBeCalledWith(expected)
Expected mock function to have been called with:
"file:///a/out/index.html" as argument 1, but it was called with "file:///a\\out\\index.html".
10 | const loadStub = jest.fn()
11 | loadURL({ loadURL: loadStub } as any, "a", false)
> 12 | expect(loadStub).toBeCalledWith("file:///a/out/index.html")
13 | })
14 |
at Object.<anonymous>.test (src/main-window/load-url.test.ts:12:20)
This is the error message. The difference between /s and \s is mostly an OS choice thing (and I cannot fathom why Windows ever decided to go with \s) but it does cause an error.
Metadata
Metadata
Assignees
Labels
No labels