@@ -3,11 +3,11 @@ import { waitForError, waitForTransaction } from '@sentry-internal/event-proxy-s
3
3
4
4
test ( 'Should create a transaction for route handlers' , async ( { request } ) => {
5
5
const routehandlerTransactionPromise = waitForTransaction ( 'nextjs-13-app-dir' , async transactionEvent => {
6
- console . log ( 'should be GET /route-handlers/[param]' , transactionEvent ? .transaction ) ;
6
+ console . log ( 'should be GET /route-handlers/[param]' , transactionEvent . transaction ) ;
7
7
// Sometimes, next.js adds /route there, we accept both variants
8
8
return (
9
- transactionEvent ? .transaction === 'GET /route-handlers/[param]' ||
10
- transactionEvent ? .transaction === 'GET /route-handlers/[param]/route'
9
+ transactionEvent . transaction === 'GET /route-handlers/[param]' ||
10
+ transactionEvent . transaction === 'GET /route-handlers/[param]/route'
11
11
) ;
12
12
} ) ;
13
13
@@ -25,11 +25,11 @@ test('Should create a transaction for route handlers and correctly set span stat
25
25
request,
26
26
} ) => {
27
27
const routehandlerTransactionPromise = waitForTransaction ( 'nextjs-13-app-dir' , async transactionEvent => {
28
- console . log ( 'should be POST /route-handlers/[param]' , transactionEvent ? .transaction ) ;
28
+ console . log ( 'should be POST /route-handlers/[param]' , transactionEvent . transaction ) ;
29
29
// Sometimes, next.js adds /route there, we accept both variants
30
30
return (
31
- transactionEvent ? .transaction === 'POST /route-handlers/[param]' ||
32
- transactionEvent ? .transaction === 'POST /route-handlers/[param]/route'
31
+ transactionEvent . transaction === 'POST /route-handlers/[param]' ||
32
+ transactionEvent . transaction === 'POST /route-handlers/[param]/route'
33
33
) ;
34
34
} ) ;
35
35
@@ -49,11 +49,11 @@ test('Should record exceptions and transactions for faulty route handlers', asyn
49
49
50
50
const routehandlerTransactionPromise = waitForTransaction ( 'nextjs-13-app-dir' , async transactionEvent => {
51
51
console . log ( 'transactionEvent3' , JSON . stringify ( transactionEvent , null , 2 ) ) ;
52
- console . log ( 'should be PUT /route-handlers/[param]' , transactionEvent ? .transaction ) ;
52
+ console . log ( 'should be PUT /route-handlers/[param]' , transactionEvent . transaction ) ;
53
53
// Sometimes, next.js adds /route there, we accept both variants
54
54
return (
55
- transactionEvent ? .transaction === 'PUT /route-handlers/[param]' ||
56
- transactionEvent ? .transaction === 'PUT /route-handlers/[param]/route'
55
+ transactionEvent . transaction === 'PUT /route-handlers/[param]' ||
56
+ transactionEvent . transaction === 'PUT /route-handlers/[param]/route'
57
57
) ;
58
58
} ) ;
59
59
@@ -82,7 +82,7 @@ test('Should record exceptions and transactions for faulty route handlers', asyn
82
82
test . describe ( 'Edge runtime' , ( ) => {
83
83
test ( 'should create a transaction for route handlers' , async ( { request } ) => {
84
84
const routehandlerTransactionPromise = waitForTransaction ( 'nextjs-13-app-dir' , async transactionEvent => {
85
- return transactionEvent ? .transaction === 'PATCH /route-handlers/[param]/edge' ;
85
+ return transactionEvent . transaction === 'PATCH /route-handlers/[param]/edge' ;
86
86
} ) ;
87
87
88
88
const response = await request . patch ( '/route-handlers/bar/edge' ) ;
@@ -100,7 +100,7 @@ test.describe('Edge runtime', () => {
100
100
} ) ;
101
101
102
102
const routehandlerTransactionPromise = waitForTransaction ( 'nextjs-13-app-dir' , async transactionEvent => {
103
- return transactionEvent ? .transaction === 'DELETE /route-handlers/[param]/edge' ;
103
+ return transactionEvent . transaction === 'DELETE /route-handlers/[param]/edge' ;
104
104
} ) ;
105
105
106
106
await request . delete ( '/route-handlers/baz/edge' ) . catch ( ( ) => {
0 commit comments