@@ -21,26 +21,24 @@ module.exports = function(server) {
2121 } ) ;
2222 } ) ;
2323
24- for ( var path of [ '/step' , '/step-error' ] ) {
25- it ( `${ path } route should profile one step` , function ( done ) {
26- server . get ( path , ( err , response ) => {
27- var ids = JSON . parse ( response . headers [ 'x-miniprofiler-ids' ] ) ;
28- expect ( ids ) . to . have . lengthOf ( 1 ) ;
24+ it ( '/step route should profile one step' , function ( done ) {
25+ server . get ( '/step' , ( err , response ) => {
26+ var ids = JSON . parse ( response . headers [ 'x-miniprofiler-ids' ] ) ;
27+ expect ( ids ) . to . have . lengthOf ( 1 ) ;
2928
30- server . post ( '/mini-profiler-resources/results' , { id : ids [ 0 ] , popup : 1 } , ( err , response , body ) => {
31- var result = JSON . parse ( body ) ;
32- expect ( result . Id ) . to . equal ( ids [ 0 ] ) ;
33- expect ( result . Name ) . to . equal ( path ) ;
34- expect ( result . Root . Children ) . to . have . lengthOf ( 1 ) ;
29+ server . post ( '/mini-profiler-resources/results' , { id : ids [ 0 ] , popup : 1 } , ( err , response , body ) => {
30+ var result = JSON . parse ( body ) ;
31+ expect ( result . Id ) . to . equal ( ids [ 0 ] ) ;
32+ expect ( result . Name ) . to . equal ( '/step' ) ;
33+ expect ( result . Root . Children ) . to . have . lengthOf ( 1 ) ;
3534
36- expect ( result . Root . Children [ 0 ] . Name ) . to . equal ( 'Step' ) ;
37- expect ( result . Root . Children [ 0 ] . Children ) . to . be . empty ;
35+ expect ( result . Root . Children [ 0 ] . Name ) . to . equal ( 'Step' ) ;
36+ expect ( result . Root . Children [ 0 ] . Children ) . to . be . empty ;
3837
39- done ( ) ;
40- } ) ;
38+ done ( ) ;
4139 } ) ;
4240 } ) ;
43- }
41+ } ) ;
4442
4543 it ( 'step-two route should profile two nested step' , function ( done ) {
4644 server . get ( '/step-two' , ( err , response ) => {
0 commit comments