Skip to content

Commit 75077d7

Browse files
committed
refactor(src): fix windows ESM filepath inference support
1 parent 54d3dfa commit 75077d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plugin-tester.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,9 @@ function pluginTester(options: PluginTesterOptions = {}) {
361361
return filePath
362362
? {
363363
functionName,
364-
// ? Paranoid just in case the script name/path has colons
364+
// ? Just in case the script name/path has colons
365365
filePath: filePath
366-
.split('file://')
366+
.split(`file://${process.platform == 'win32' ? '/' : ''}`)
367367
.at(-1)!
368368
.split(':')
369369
.slice(0, -2)

0 commit comments

Comments
 (0)