@@ -5,6 +5,7 @@ const common = require('../common');
55common . skipIfInspectorDisabled ( ) ;
66
77const assert = require ( 'assert' ) ;
8+ const { resolve : UrlResolve } = require ( 'url' ) ;
89const fixtures = require ( '../common/fixtures' ) ;
910const { NodeInstance } = require ( '../common/inspector-helper.js' ) ;
1011
@@ -43,14 +44,15 @@ async function testBreakpointOnStart(session) {
4344 ] ;
4445
4546 await session . send ( commands ) ;
46- await session . waitForBreakOnLine ( 0 , session . scriptURL ( ) ) ;
47+ await session . waitForBreakOnLine (
48+ 0 , UrlResolve ( session . scriptURL ( ) . toString ( ) , 'message.mjs' ) ) ;
4749}
4850
4951async function testBreakpoint ( session ) {
5052 console . log ( '[test]' , 'Setting a breakpoint and verifying it is hit' ) ;
5153 const commands = [
5254 { 'method' : 'Debugger.setBreakpointByUrl' ,
53- 'params' : { 'lineNumber' : 5 ,
55+ 'params' : { 'lineNumber' : 7 ,
5456 'url' : session . scriptURL ( ) ,
5557 'columnNumber' : 0 ,
5658 'condition' : ''
@@ -66,7 +68,7 @@ async function testBreakpoint(session) {
6668 `Script source is wrong: ${ scriptSource } ` ) ;
6769
6870 await session . waitForConsoleOutput ( 'log' , [ 'A message' , 5 ] ) ;
69- const paused = await session . waitForBreakOnLine ( 5 , session . scriptURL ( ) ) ;
71+ const paused = await session . waitForBreakOnLine ( 7 , session . scriptURL ( ) ) ;
7072 const scopeId = paused . params . callFrames [ 0 ] . scopeChain [ 0 ] . object . objectId ;
7173
7274 console . log ( '[test]' , 'Verify we can read current application state' ) ;
@@ -79,7 +81,7 @@ async function testBreakpoint(session) {
7981 'generatePreview' : true
8082 }
8183 } ) ;
82- assertScopeValues ( response , { t : 1001 , k : 1 } ) ;
84+ assertScopeValues ( response , { t : 1001 , k : 1 , message : 'A message' } ) ;
8385
8486 let { result } = await session . send ( {
8587 'method' : 'Debugger.evaluateOnCallFrame' , 'params' : {
0 commit comments