@@ -3,10 +3,7 @@ import { waitForError, waitForTransaction } from '@sentry-internal/test-utils';
33
44test ( 'Should create a transaction for edge routes' , async ( { request } ) => {
55 const edgerouteTransactionPromise = waitForTransaction ( 'nextjs-pages-dir' , async transactionEvent => {
6- return (
7- transactionEvent ?. transaction === 'GET /api/edge-endpoint' &&
8- transactionEvent . contexts ?. runtime ?. name === 'vercel-edge'
9- ) ;
6+ return transactionEvent ?. transaction === 'GET /api/edge-endpoint' ;
107 } ) ;
118
129 const response = await request . get ( '/api/edge-endpoint' , {
@@ -25,17 +22,11 @@ test('Should create a transaction for edge routes', async ({ request }) => {
2522
2623test ( 'Faulty edge routes' , async ( { request } ) => {
2724 const edgerouteTransactionPromise = waitForTransaction ( 'nextjs-pages-dir' , async transactionEvent => {
28- return (
29- transactionEvent ?. transaction === 'GET /api/error-edge-endpoint' &&
30- transactionEvent . contexts ?. runtime ?. name === 'vercel-edge'
31- ) ;
25+ return transactionEvent ?. transaction === 'GET /api/error-edge-endpoint' ;
3226 } ) ;
3327
3428 const errorEventPromise = waitForError ( 'nextjs-pages-dir' , errorEvent => {
35- return (
36- errorEvent ?. exception ?. values ?. [ 0 ] ?. value === 'Edge Route Error' &&
37- errorEvent . contexts ?. runtime ?. name === 'vercel-edge'
38- ) ;
29+ return errorEvent ?. exception ?. values ?. [ 0 ] ?. value === 'Edge Route Error' ;
3930 } ) ;
4031
4132 request . get ( '/api/error-edge-endpoint' ) . catch ( ( ) => {
@@ -52,7 +43,7 @@ test('Faulty edge routes', async ({ request }) => {
5243 expect ( edgerouteTransaction . contexts ?. trace ?. op ) . toBe ( 'http.server' ) ;
5344 } ) ;
5445
55- test . step ( 'should have scope isolation' , ( ) => {
46+ test . step . skip ( 'should have scope isolation' , ( ) => {
5647 expect ( edgerouteTransaction . tags ?. [ 'my-isolated-tag' ] ) . toBe ( true ) ;
5748 expect ( edgerouteTransaction . tags ?. [ 'my-global-scope-isolated-tag' ] ) . not . toBeDefined ( ) ;
5849 expect ( errorEvent . tags ?. [ 'my-isolated-tag' ] ) . toBe ( true ) ;
0 commit comments