Skip to content

Commit 4122f42

Browse files
authored
fix middleware-general deploy test (#67712)
The copy on this error changed in #67565 but it caused an error when deployed since the message text was different ([ref](https://github.com/vercel/next.js/actions/runs/9899883735/job/27350409711#step:27:764))
1 parent 38a6b01 commit 4122f42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/e2e/middleware-general/test/index.test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,8 @@ describe('Middleware Runtime', () => {
561561
const payload = readMiddlewareJSON(response)
562562
expect('error' in payload).toBe(true)
563563
expect(payload.error.name).toBe('AbortError')
564-
expect(payload.error.message).toContain('This operation was aborted')
564+
// AbortError messages differ depending on the runtime
565+
expect(payload.error.message).toMatch(/(This|The) operation was aborted/)
565566
})
566567

567568
it(`should validate & parse request url from any route`, async () => {

0 commit comments

Comments
 (0)