Skip to content

Commit

Permalink
Fix CDN caching test
Browse files Browse the repository at this point in the history
We should do multiple requests to check that the initial request is
cached. Otherwise a single request within a 5 min window will be
uncached.
  • Loading branch information
theseanything committed Jul 26, 2024
1 parent 93dfb0c commit 93acfaa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/cdn.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ test.describe("CDN", () => {
});

test("Check caching behaviour for GET requests", { tag: ["@notcloudfront"] }, async ({ page }) => {
await page.request.get("/");
const response = await page.request.get("/");
expect(parseInt(response.headers()["x-cache-hits"])).toBeGreaterThan(0);
});
Expand Down

0 comments on commit 93acfaa

Please sign in to comment.