File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/core/src/runtime/runner Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 1+ import path from 'node:path' ;
12import { fileURLToPath } from 'node:url' ;
23import { parse as stackTraceParse } from 'stacktrace-parser' ;
34import type {
@@ -494,8 +495,10 @@ export const createRuntimeAPI = ({
494495 if ( stack ) {
495496 const frames = stackTraceParse ( stack ) ;
496497 for ( const frame of frames ) {
497- let filename = frame . file ;
498- if ( filename ?. startsWith ( 'file://' ) ) filename = fileURLToPath ( filename ) ;
498+ let filename = frame . file ?? '' ;
499+ if ( filename . startsWith ( 'file://' ) ) filename = fileURLToPath ( filename ) ;
500+ // testPath is always unix path style, so convert filename with same way
501+ filename = filename . replaceAll ( path . sep , '/' ) ;
499502 if ( filename === testPath ) {
500503 const line = frame . lineNumber ;
501504 const column = frame . column ;
You can’t perform that action at this time.
0 commit comments