Skip to content

Commit ecfe19b

Browse files
committed
test: update next 13 assertions
1 parent 9c04b47 commit ecfe19b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

dev-packages/e2e-tests/test-applications/nextjs-13/tests/server/cjs-api-endpoints.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ test('should create a transaction for a CJS pages router API endpoint', async ({
3939
data: {
4040
'http.response.status_code': 200,
4141
'sentry.op': 'http.server',
42-
'sentry.origin': 'auto.http.nextjs',
42+
'sentry.origin': 'auto',
4343
'sentry.sample_rate': 1,
4444
'sentry.source': 'route',
4545
},
4646
op: 'http.server',
47-
origin: 'auto.http.nextjs',
47+
origin: 'auto',
4848
span_id: expect.stringMatching(/[a-f0-9]{16}/),
4949
status: 'ok',
5050
trace_id: expect.stringMatching(/[a-f0-9]{32}/),
@@ -57,7 +57,7 @@ test('should create a transaction for a CJS pages router API endpoint', async ({
5757
cookies: expect.any(Object),
5858
headers: expect.any(Object),
5959
method: 'GET',
60-
url: expect.stringMatching(/^http.*\/api\/cjs-api-endpoint$/),
60+
url: expect.stringMatching(/^\/api\/cjs-api-endpoint$/),
6161
},
6262
spans: expect.arrayContaining([]),
6363
start_timestamp: expect.any(Number),
@@ -102,12 +102,12 @@ test('should not mess up require statements in CJS API endpoints', async ({ requ
102102
data: {
103103
'http.response.status_code': 200,
104104
'sentry.op': 'http.server',
105-
'sentry.origin': 'auto.http.nextjs',
105+
'sentry.origin': 'auto',
106106
'sentry.sample_rate': 1,
107107
'sentry.source': 'route',
108108
},
109109
op: 'http.server',
110-
origin: 'auto.http.nextjs',
110+
origin: 'auto',
111111
span_id: expect.stringMatching(/[a-f0-9]{16}/),
112112
status: 'ok',
113113
trace_id: expect.stringMatching(/[a-f0-9]{32}/),
@@ -120,7 +120,7 @@ test('should not mess up require statements in CJS API endpoints', async ({ requ
120120
cookies: expect.any(Object),
121121
headers: expect.any(Object),
122122
method: 'GET',
123-
url: expect.stringMatching(/^http.*\/api\/cjs-api-endpoint-with-require$/),
123+
url: expect.stringMatching(/^\/api\/cjs-api-endpoint-with-require$/),
124124
},
125125
spans: expect.arrayContaining([]),
126126
start_timestamp: expect.any(Number),

dev-packages/e2e-tests/test-applications/nextjs-13/tests/server/pages-router-api-endpoints.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ test('Should report a transaction event for a successful pages router api route'
9898
data: {
9999
'http.response.status_code': 200,
100100
'sentry.op': 'http.server',
101-
'sentry.origin': 'auto.http.nextjs',
101+
'sentry.origin': 'auto',
102102
'sentry.source': 'route',
103103
},
104104
op: 'http.server',
105-
origin: 'auto.http.nextjs',
105+
origin: 'auto',
106106
span_id: expect.stringMatching(/[a-f0-9]{16}/),
107107
status: 'ok',
108108
trace_id: expect.stringMatching(/[a-f0-9]{32}/),
@@ -112,7 +112,7 @@ test('Should report a transaction event for a successful pages router api route'
112112
request: {
113113
headers: expect.any(Object),
114114
method: 'GET',
115-
url: expect.stringMatching(/^http.*\/api\/foo\/success-api-route$/),
115+
url: expect.stringMatching(/^\/api\/foo\/success-api-route$/),
116116
},
117117
start_timestamp: expect.any(Number),
118118
timestamp: expect.any(Number),

0 commit comments

Comments
 (0)