@@ -102,10 +102,12 @@ describe('PHP Debug Adapter', () => {
102102 describe ( 'line breakpoints' , ( ) => {
103103 async function testBreakpointHit ( program : string , line : number ) : Promise < void > {
104104 await Promise . all ( [ client . launch ( { program } ) , client . waitForEvent ( 'initialized' ) ] )
105- const breakpoint = ( await client . setBreakpointsRequest ( {
106- breakpoints : [ { line } ] ,
107- source : { path : program } ,
108- } ) ) . body . breakpoints [ 0 ]
105+ const breakpoint = (
106+ await client . setBreakpointsRequest ( {
107+ breakpoints : [ { line } ] ,
108+ source : { path : program } ,
109+ } )
110+ ) . body . breakpoints [ 0 ]
109111 assert . isTrue ( breakpoint . verified , 'breakpoint verification mismatch: verified' )
110112 assert . equal ( breakpoint . line , line , 'breakpoint verification mismatch: line' )
111113 await Promise . all ( [
@@ -124,10 +126,12 @@ describe('PHP Debug Adapter', () => {
124126 it ( 'should support removing a breakpoint' , async ( ) => {
125127 await Promise . all ( [ client . launch ( { program } ) , client . waitForEvent ( 'initialized' ) ] )
126128 // set two breakpoints
127- let breakpoints = ( await client . setBreakpointsRequest ( {
128- breakpoints : [ { line : 3 } , { line : 5 } ] ,
129- source : { path : program } ,
130- } ) ) . body . breakpoints
129+ let breakpoints = (
130+ await client . setBreakpointsRequest ( {
131+ breakpoints : [ { line : 3 } , { line : 5 } ] ,
132+ source : { path : program } ,
133+ } )
134+ ) . body . breakpoints
131135 assert . lengthOf ( breakpoints , 2 )
132136 assert . isTrue ( breakpoints [ 0 ] . verified , 'breakpoint verification mismatch: verified' )
133137 assert . equal ( breakpoints [ 0 ] . line , 3 , 'breakpoint verification mismatch: line' )
@@ -139,10 +143,12 @@ describe('PHP Debug Adapter', () => {
139143 client . configurationDoneRequest ( ) ,
140144 ] )
141145 // remove second
142- breakpoints = ( await client . setBreakpointsRequest ( {
143- breakpoints : [ { line : 3 } ] ,
144- source : { path : program } ,
145- } ) ) . body . breakpoints
146+ breakpoints = (
147+ await client . setBreakpointsRequest ( {
148+ breakpoints : [ { line : 3 } ] ,
149+ source : { path : program } ,
150+ } )
151+ ) . body . breakpoints
146152 assert . lengthOf ( breakpoints , 1 )
147153 assert . isTrue ( breakpoints [ 0 ] . verified , 'breakpoint verification mismatch: verified' )
148154 assert . equal ( breakpoints [ 0 ] . line , 3 , 'breakpoint verification mismatch: line' )
@@ -243,9 +249,11 @@ describe('PHP Debug Adapter', () => {
243249 async function getErrorScope ( ) : Promise < ErrorScope > {
244250 const frameId = ( await client . stackTraceRequest ( { threadId : threadId ! } ) ) . body . stackFrames [ 0 ] . id
245251 const errorScope = ( await client . scopesRequest ( { frameId } ) ) . body . scopes [ 0 ]
246- const variables = ( await client . variablesRequest ( {
247- variablesReference : errorScope . variablesReference ,
248- } ) ) . body . variables
252+ const variables = (
253+ await client . variablesRequest ( {
254+ variablesReference : errorScope . variablesReference ,
255+ } )
256+ ) . body . variables
249257 const errorInfo : ErrorScope = { name : errorScope . name }
250258 const type = variables . find ( variable => variable . name === 'type' )
251259 if ( type ) {
@@ -301,30 +309,36 @@ describe('PHP Debug Adapter', () => {
301309
302310 it ( 'should stop on a conditional breakpoint when condition is true' , async ( ) => {
303311 await Promise . all ( [ client . launch ( { program } ) , client . waitForEvent ( 'initialized' ) ] )
304- const bp = ( await client . setBreakpointsRequest ( {
305- breakpoints : [ { line : 10 , condition : '$anInt === 123' } ] ,
306- source : { path : program } ,
307- } ) ) . body . breakpoints [ 0 ]
312+ const bp = (
313+ await client . setBreakpointsRequest ( {
314+ breakpoints : [ { line : 10 , condition : '$anInt === 123' } ] ,
315+ source : { path : program } ,
316+ } )
317+ ) . body . breakpoints [ 0 ]
308318 assert . equal ( bp . verified , true , 'breakpoint verification mismatch: verified' )
309319 assert . equal ( bp . line , 10 , 'breakpoint verification mismatch: line' )
310320 const [ , { frame } ] = await Promise . all ( [
311321 client . configurationDoneRequest ( ) ,
312322 assertStoppedLocation ( 'breakpoint' , program , 10 ) ,
313323 ] )
314- const result = ( await client . evaluateRequest ( {
315- context : 'watch' ,
316- frameId : frame . id ,
317- expression : '$anInt' ,
318- } ) ) . body . result
324+ const result = (
325+ await client . evaluateRequest ( {
326+ context : 'watch' ,
327+ frameId : frame . id ,
328+ expression : '$anInt' ,
329+ } )
330+ ) . body . result
319331 assert . equal ( result , '123' )
320332 } )
321333
322334 it ( 'should not stop on a conditional breakpoint when condition is false' , async ( ) => {
323335 await Promise . all ( [ client . launch ( { program } ) , client . waitForEvent ( 'initialized' ) ] )
324- const bp = ( await client . setBreakpointsRequest ( {
325- breakpoints : [ { line : 10 , condition : '$anInt !== 123' } ] ,
326- source : { path : program } ,
327- } ) ) . body . breakpoints [ 0 ]
336+ const bp = (
337+ await client . setBreakpointsRequest ( {
338+ breakpoints : [ { line : 10 , condition : '$anInt !== 123' } ] ,
339+ source : { path : program } ,
340+ } )
341+ ) . body . breakpoints [ 0 ]
328342 assert . equal ( bp . verified , true , 'breakpoint verification mismatch: verified' )
329343 assert . equal ( bp . line , 10 , 'breakpoint verification mismatch: line' )
330344 await Promise . all ( [ client . configurationDoneRequest ( ) , client . waitForEvent ( 'terminated' ) ] )
@@ -337,9 +351,11 @@ describe('PHP Debug Adapter', () => {
337351 it ( 'should stop on a function breakpoint' , async ( ) => {
338352 await client . launch ( { program } )
339353 await client . waitForEvent ( 'initialized' )
340- const breakpoint = ( await client . setFunctionBreakpointsRequest ( {
341- breakpoints : [ { name : 'a_function' } ] ,
342- } ) ) . body . breakpoints [ 0 ]
354+ const breakpoint = (
355+ await client . setFunctionBreakpointsRequest ( {
356+ breakpoints : [ { name : 'a_function' } ] ,
357+ } )
358+ ) . body . breakpoints [ 0 ]
343359 assert . strictEqual ( breakpoint . verified , true )
344360 await Promise . all ( [ client . configurationDoneRequest ( ) , assertStoppedLocation ( 'breakpoint' , program , 5 ) ] )
345361 } )
@@ -434,9 +450,11 @@ describe('PHP Debug Adapter', () => {
434450 assert . isDefined ( aLargeArray )
435451 assert . propertyVal ( aLargeArray ! , 'value' , 'array(100)' )
436452 assert . property ( aLargeArray ! , 'variablesReference' )
437- const largeArrayItems = ( await client . variablesRequest ( {
438- variablesReference : aLargeArray ! . variablesReference ,
439- } ) ) . body . variables
453+ const largeArrayItems = (
454+ await client . variablesRequest ( {
455+ variablesReference : aLargeArray ! . variablesReference ,
456+ } )
457+ ) . body . variables
440458 assert . lengthOf ( largeArrayItems , 100 )
441459 assert . propertyVal ( largeArrayItems [ 0 ] , 'name' , '0' )
442460 assert . propertyVal ( largeArrayItems [ 0 ] , 'value' , '"test"' )
@@ -449,9 +467,11 @@ describe('PHP Debug Adapter', () => {
449467 assert . isDefined ( arrayWithSpaceKey )
450468 assert . propertyVal ( arrayWithSpaceKey ! , 'value' , 'array(1)' )
451469 assert . property ( arrayWithSpaceKey ! , 'variablesReference' )
452- const arrayWithSpaceKeyItems = ( await client . variablesRequest ( {
453- variablesReference : arrayWithSpaceKey ! . variablesReference ,
454- } ) ) . body . variables
470+ const arrayWithSpaceKeyItems = (
471+ await client . variablesRequest ( {
472+ variablesReference : arrayWithSpaceKey ! . variablesReference ,
473+ } )
474+ ) . body . variables
455475 assert . lengthOf ( arrayWithSpaceKeyItems , 1 )
456476 assert . propertyVal ( arrayWithSpaceKeyItems [ 0 ] , 'name' , 'space key' )
457477 assert . propertyVal ( arrayWithSpaceKeyItems [ 0 ] , 'value' , '1' )
@@ -461,9 +481,11 @@ describe('PHP Debug Adapter', () => {
461481 // support for user defined constants was added in 2.3.0
462482 if ( ! process . env [ 'XDEBUG_VERSION' ] || semver . gte ( process . env [ 'XDEBUG_VERSION' ] , '2.3.0' ) ) {
463483 it ( 'should report user defined constants correctly' , async ( ) => {
464- const constants = ( await client . variablesRequest ( {
465- variablesReference : constantsScope ! . variablesReference ,
466- } ) ) . body . variables
484+ const constants = (
485+ await client . variablesRequest ( {
486+ variablesReference : constantsScope ! . variablesReference ,
487+ } )
488+ ) . body . variables
467489 assert . lengthOf ( constants , 1 )
468490 assert . propertyVal ( constants [ 0 ] , 'name' , 'TEST_CONSTANT' )
469491 assert . propertyVal ( constants [ 0 ] , 'value' , '123' )
0 commit comments