@@ -344,7 +344,7 @@ describe('ExpressInstrumentation', () => {
344344 ) ;
345345 } ) ;
346346
347- it ( 'captures thrown endpoint errors' , async ( ) => {
347+ it ( 'captures thrown errors' , async ( ) => {
348348 const rootSpan = tracer . startSpan ( 'rootSpan' ) ;
349349 let finishListenerCount : number | undefined ;
350350 const httpServer = await serverWithMiddleware ( tracer , rootSpan , app => {
@@ -355,7 +355,7 @@ describe('ExpressInstrumentation', () => {
355355 next ( ) ;
356356 } ) ;
357357
358- app . get ( '/error' , ( req , res ) => {
358+ app . use ( ( req , res ) => {
359359 throw new Error ( 'message' ) ;
360360 } ) ;
361361 } ) ;
@@ -366,7 +366,7 @@ describe('ExpressInstrumentation', () => {
366366 await context . with (
367367 trace . setSpan ( context . active ( ) , rootSpan ) ,
368368 async ( ) => {
369- await httpRequest . get ( `http://localhost:${ port } /error ` ) ;
369+ await httpRequest . get ( `http://localhost:${ port } /` ) ;
370370 rootSpan . end ( ) ;
371371 assert . strictEqual ( finishListenerCount , 2 ) ;
372372
@@ -391,7 +391,7 @@ describe('ExpressInstrumentation', () => {
391391 const app = express ( ) ;
392392 app . use ( express . json ( ) ) ;
393393 app . use ( ( req , res , next ) => {
394- for ( let i = 0 ; i < 1000000 ; i ++ ) { }
394+ for ( let i = 0 ; i < 1000000 ; i ++ ) { }
395395 return next ( ) ;
396396 } ) ;
397397 const router = express . Router ( ) ;
0 commit comments