From f2b44affa297aa76672037d6c111299f3493676d Mon Sep 17 00:00:00 2001 From: Jude Gao Date: Mon, 4 Nov 2024 13:33:54 -0500 Subject: [PATCH] fix middleware-error test --- test/development/middleware-errors/index.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/development/middleware-errors/index.test.ts b/test/development/middleware-errors/index.test.ts index 1dd3d45f1ee61..110846256309c 100644 --- a/test/development/middleware-errors/index.test.ts +++ b/test/development/middleware-errors/index.test.ts @@ -55,7 +55,7 @@ describe('middleware - development errors', () => { const browser = await next.browser('/') await assertHasRedbox(browser) await next.patchFile('middleware.js', `export default function () {}`) - await assertHasRedbox(browser) + await assertNoRedbox(browser) }) }) @@ -160,7 +160,7 @@ describe('middleware - development errors', () => { await assertHasRedbox(browser) expect(await getRedboxSource(browser)).toContain(`eval('test')`) await next.patchFile('middleware.js', `export default function () {}`) - await assertHasRedbox(browser) + await assertNoRedbox(browser) }) }) @@ -207,7 +207,7 @@ describe('middleware - development errors', () => { expect(source).toContain('middleware.js') expect(source).not.toContain('//middleware.js') await next.patchFile('middleware.js', `export default function () {}`) - await assertHasRedbox(browser) + await assertNoRedbox(browser) }) }) @@ -311,7 +311,7 @@ describe('middleware - development errors', () => { await browser.elementByCss('#nextjs__container_errors_desc').text() ).toEqual('Failed to compile') await next.patchFile('middleware.js', `export default function () {}`) - await assertHasRedbox(browser) + await assertNoRedbox(browser) expect(await browser.elementByCss('#page-title')).toBeTruthy() }) })