@@ -318,7 +318,7 @@ describe('Dynamic Instrumentation', function () {
318318 } )
319319
320320 t . agent . on ( 'debugger-input' , ( { payload } ) => {
321- payload . forEach ( ( { ' debugger. snapshot' : { timestamp } } ) => {
321+ payload . forEach ( ( { debugger : { snapshot : { timestamp } } } ) => {
322322 if ( prev !== undefined ) {
323323 const duration = timestamp - prev
324324 clearTimeout ( timer )
@@ -364,8 +364,8 @@ describe('Dynamic Instrumentation', function () {
364364
365365 t . agent . on ( 'debugger-input' , ( { payload } ) => {
366366 payload . forEach ( ( result ) => {
367- const _state = state [ result [ ' debugger.snapshot' ] . probe . id ]
368- const { timestamp } = result [ ' debugger.snapshot' ]
367+ const _state = state [ result . debugger . snapshot . probe . id ]
368+ const { timestamp } = result . debugger . snapshot
369369 if ( _state . prev !== undefined ) {
370370 const duration = timestamp - _state . prev
371371 clearTimeout ( _state . timer )
@@ -588,36 +588,38 @@ function assertBasicInputPayload (t, payload) {
588588 version,
589589 thread_name : 'MainThread'
590590 } ,
591- 'debugger.snapshot' : {
592- probe : {
593- id : t . rcConfig . config . id ,
594- version : 0 ,
595- location : { file : t . breakpoint . deployedFile , lines : [ String ( t . breakpoint . line ) ] }
596- } ,
597- language : 'javascript'
591+ debugger : {
592+ snapshot : {
593+ probe : {
594+ id : t . rcConfig . config . id ,
595+ version : 0 ,
596+ location : { file : t . breakpoint . deployedFile , lines : [ String ( t . breakpoint . line ) ] }
597+ } ,
598+ language : 'javascript'
599+ }
598600 }
599601 }
600602
601603 assertObjectContains ( payload , expected )
602604
603605 assert . match ( payload . logger . thread_id , / ^ p i d : \d + $ / )
604606
605- assertUUID ( payload [ ' debugger.snapshot' ] . id )
606- assert . isNumber ( payload [ ' debugger.snapshot' ] . timestamp )
607- assert . isTrue ( payload [ ' debugger.snapshot' ] . timestamp > Date . now ( ) - 1000 * 60 )
608- assert . isTrue ( payload [ ' debugger.snapshot' ] . timestamp <= Date . now ( ) )
607+ assertUUID ( payload . debugger . snapshot . id )
608+ assert . isNumber ( payload . debugger . snapshot . timestamp )
609+ assert . isTrue ( payload . debugger . snapshot . timestamp > Date . now ( ) - 1000 * 60 )
610+ assert . isTrue ( payload . debugger . snapshot . timestamp <= Date . now ( ) )
609611
610- assert . isArray ( payload [ ' debugger.snapshot' ] . stack )
611- assert . isAbove ( payload [ ' debugger.snapshot' ] . stack . length , 0 )
612- for ( const frame of payload [ ' debugger.snapshot' ] . stack ) {
612+ assert . isArray ( payload . debugger . snapshot . stack )
613+ assert . isAbove ( payload . debugger . snapshot . stack . length , 0 )
614+ for ( const frame of payload . debugger . snapshot . stack ) {
613615 assert . isObject ( frame )
614616 assert . hasAllKeys ( frame , [ 'fileName' , 'function' , 'lineNumber' , 'columnNumber' ] )
615617 assert . isString ( frame . fileName )
616618 assert . isString ( frame . function )
617619 assert . isAbove ( frame . lineNumber , 0 )
618620 assert . isAbove ( frame . columnNumber , 0 )
619621 }
620- const topFrame = payload [ ' debugger.snapshot' ] . stack [ 0 ]
622+ const topFrame = payload . debugger . snapshot . stack [ 0 ]
621623 // path seems to be prefeixed with `/private` on Mac
622624 assert . match ( topFrame . fileName , new RegExp ( `${ t . appFile } $` ) )
623625 assert . strictEqual ( topFrame . function , 'fooHandler' )
0 commit comments