Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit af23e85

Browse files
committed
fix tests for app dir test on 15
1 parent b0d5aae commit af23e85

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

‎dev-packages/e2e-tests/test-applications/nextjs-app-dir/tests/client-errors.test.ts‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ test('Sends a client-side exception to Sentry', async ({ page }) => {
3838

3939
expect(errorEvent.exception?.values?.[0]?.mechanism).toEqual({
4040
handled: false,
41-
type: 'auto.browser.browserapierrors.addEventListener',
42-
data: {
43-
handler: expect.any(String), // the handler name varies in CI and locally
44-
target: 'EventTarget',
45-
},
41+
type: nextjsMajor >= 15 ? 'auto.browser.global_handlers.onerror' : 'auto.browser.browserapierrors.addEventListener',
42+
...(nextjsMajor < 15 && {
43+
data: {
44+
handler: expect.any(String), // the handler name varies in CI and locally
45+
target: 'EventTarget',
46+
},
47+
}),
4648
});
4749
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /