Skip to content

Commit 649dd9e

Browse files
committed
fix test
1 parent 09a99da commit 649dd9e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

packages/tests-e2e/tests/appRouter/middleware.rewrite.test.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ test("Middleware Rewrite External Image", async ({ page }) => {
3434
});
3535

3636
test("Middleware Rewrite Status Code", async ({ page }) => {
37-
page.on("response", async (response) => {
38-
// Need to set up the event before navigating to the page to avoid missing it
39-
// We need to check the URL here also cause there will be multiple responses (i.e the fonts, css, js, etc)
40-
if (response.url() === "/rewrite-status-code") {
41-
expect(response.status()).toBe(403);
42-
}
43-
});
37+
page.on("response", async (response) => {
38+
// Need to set up the event before navigating to the page to avoid missing it
39+
// We need to check the URL here also cause there will be multiple responses (i.e the fonts, css, js, etc)
40+
if (response.url() === "/rewrite-status-code") {
41+
expect(response.status()).toBe(403);
42+
}
43+
});
4444
await page.goto("/rewrite-status-code");
4545
const el = page.getByText("Rewritten Destination", { exact: true });
4646
await expect(el).toBeVisible();

0 commit comments

Comments
 (0)