Skip to content

Commit a8381fc

Browse files
committed
fix: failed to snapshot test on windows
1 parent 3252a77 commit a8381fc

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/vscode-wdio-worker/tests/config.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import fs from 'node:fs/promises'
22
import path from 'node:path'
3+
import { resolve as winResolve } from 'node:path/posix'
34
import { pathToFileURL } from 'node:url'
45

56
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
@@ -26,7 +27,7 @@ vi.mock('node:path', async (importOriginal) => {
2627
return {
2728
default: {
2829
...actual,
29-
resolve: vi.fn((_, f) => actual.resolve(`/path/to/parser/${f}`)),
30+
resolve: vi.fn((_, f) => winResolve(`/path/to/parser/${f}`)),
3031
},
3132
}
3233
})

0 commit comments

Comments
 (0)