@@ -52,7 +52,7 @@ describe('onRequestError', () => {
5252 const errorRequest = {
5353 path : '/test-path?some=param' ,
5454 method : 'GET' ,
55- headers : { } ,
55+ headers : { }
5656 } ;
5757 const errorContext : {
5858 routerKind : 'Pages Router' ;
@@ -63,22 +63,18 @@ describe('onRequestError', () => {
6363 routerKind : 'Pages Router' ,
6464 routePath : '/test-path' ,
6565 routeType : 'render' ,
66- revalidateReason : undefined ,
66+ revalidateReason : undefined
6767 } ;
6868
6969 await onRequestError ( error , errorRequest , errorContext ) ;
7070
7171 expect ( getTelemetryStub ) . to . have . been . calledOnceWith ( fakeApp ) ;
72- expect ( captureErrorStub ) . to . have . been . calledOnceWith (
73- fakeTelemetry ,
74- error ,
75- {
76- 'nextjs_path' : '/test-path?some=param' ,
77- 'nextjs_method' : 'GET' ,
78- 'nextjs_router_kind' : 'Pages Router' ,
79- 'nextjs_route_path' : '/test-path' ,
80- 'nextjs_route_type' : 'render'
81- }
82- ) ;
72+ expect ( captureErrorStub ) . to . have . been . calledOnceWith ( fakeTelemetry , error , {
73+ 'nextjs_path' : '/test-path?some=param' ,
74+ 'nextjs_method' : 'GET' ,
75+ 'nextjs_router_kind' : 'Pages Router' ,
76+ 'nextjs_route_path' : '/test-path' ,
77+ 'nextjs_route_type' : 'render'
78+ } ) ;
8379 } ) ;
8480} ) ;
0 commit comments