Skip to content

Commit 95716ed

Browse files
committed
test(nuxt): relax captured error assertion
1 parent 65f5006 commit 95716ed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dev-packages/e2e-tests/test-applications/nuxt-3/tests/middleware.test.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ test.describe('Server Middleware Instrumentation', () => {
121121
type: 'Error',
122122
mechanism: expect.objectContaining({
123123
handled: false,
124-
type: 'auto.middleware.nuxt',
124+
// Type changes depending on whether it is being wrapped by Nitro or not
125+
// This is a timing problem, sometimes Nitro can capture the error first, and sometimes it can't
126+
// If nitro captures the error first, the type will be 'chained'
127+
// If Sentry captures the error first, the type will be 'auto.middleware.nuxt'
128+
// type: 'auto.middleware.nuxt',
125129
}),
126130
}),
127131
);

0 commit comments

Comments
 (0)