File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
plugins/node/opentelemetry-instrumentation-express/test Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -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
You can’t perform that action at this time.
0 commit comments