Skip to content

Commit 24a09fc

Browse files
sommeeeervicb
authored andcommitted
review
1 parent 5bd1629 commit 24a09fc

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed
Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
import { expect, test } from "@playwright/test";
22

3-
test("should test if poweredByHeader adds the correct headers ", async ({ page }) => {
3+
test("does not set x-opennext-requestid header on cache interceptor response", async ({ page }) => {
44
const result = await page.goto("/ssg");
55
expect(result).toBeDefined();
66
expect(result?.status()).toBe(200);
77
const headers = result?.headers();
88

9-
// This header should not be defined even when cache interception happens in the external middleware
10-
expect(headers?.["x-opennext-requestid"]).toBeFalsy();
11-
12-
await page.waitForTimeout(2000); // Wait 2s
13-
14-
const result2 = await page.goto("/ssg");
15-
expect(result2).toBeDefined();
16-
expect(result2?.status()).toBe(200);
17-
const headers2 = result2?.headers();
18-
19-
expect(headers2?.["x-opennext-requestid"]).toBeFalsy();
9+
// This header should not be defined even when its a cached response from the cache interception in the external middleware
10+
expect(headers?.["x-opennext-requestid"]).toBeUndefined();
2011
});

0 commit comments

Comments
 (0)