File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
packages/vitest/src/runtime Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 11import { createRequire } from 'node:module'
2-
2+ import { pathToFileURL } from 'node:url'
33import type { ContextRPC , ResolvedConfig } from '../types'
44
55const __require = createRequire ( import . meta. url )
@@ -37,7 +37,7 @@ export function setupInspect(ctx: ContextRPC) {
3737 session . post ( 'Debugger.enable' )
3838 session . post ( 'Debugger.setBreakpointByUrl' , {
3939 lineNumber : 0 ,
40- url : new URL ( firstTestFile , import . meta . url ) . href ,
40+ url : pathToFileURL ( firstTestFile ) ,
4141 } )
4242 }
4343 }
Original file line number Diff line number Diff line change @@ -2,12 +2,11 @@ import type { InspectorNotification } from 'node:inspector'
22import { expect , test } from 'vitest'
33import WebSocket from 'ws'
44
5- import { isWindows } from '../../../packages/vite-node/src/utils'
65import { runVitestCli } from '../../test-utils'
76
87type Message = Partial < InspectorNotification < any > >
98
10- test . skipIf ( isWindows ) ( '--inspect-brk stops at test file' , async ( ) => {
9+ test ( '--inspect-brk stops at test file' , async ( ) => {
1110 const { vitest, waitForClose } = await runVitestCli (
1211 '--root' ,
1312 'fixtures/inspect' ,
You can’t perform that action at this time.
0 commit comments