Skip to content

Commit 52811fa

Browse files
committed
test: adjust assertion for case where multiple cache-status values are being comma separated and not line separated
1 parent 3fbf588 commit 52811fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/e2e/simple-app.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ test('Renders the Home page correctly', async ({ page, simple }) => {
1212

1313
await expect(page).toHaveTitle('Simple Next App')
1414

15-
expect(headers['cache-status']).toMatch(/^"Next.js"; hit$/m)
16-
expect(headers['cache-status']).toMatch(/^"Netlify Edge"; fwd=miss$/m)
15+
expect(headers['cache-status']).toMatch(/^"Next.js"; hit($|,)/m)
16+
expect(headers['cache-status']).toMatch(/^"Netlify Edge"; fwd=miss($|,)/m)
1717
// "Netlify Durable" assertion is skipped because we are asserting index page and there are possible that something else is making similar request to it
1818
// and as a result we can see many possible statuses for it: `fwd=miss`, `fwd=miss; stored`, `hit; ttl=<ttl>` so there is no point in asserting on that
1919
// "Netlify Edge" status suffers from similar issue, but is less likely to manifest (only if those requests would be handled by same CDN node) and retries

0 commit comments

Comments
 (0)