Skip to content

Commit dadbe42

Browse files
committed
artificial delay
1 parent 4eb933c commit dadbe42

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pages-e2e/features/appFetchCache/fetch-cache.test.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { beforeAll, describe, it } from 'vitest';
1+
import { describe, it } from 'vitest';
22

33
describe('Simple App server API route with fetch caching', () => {
44
it('should return a cached fetch response from the suspense cache', async ({
@@ -12,6 +12,9 @@ describe('Simple App server API route with fetch caching', () => {
1212
expect.not.objectContaining({ 'cf-next-suspense-cache': 'HIT' }),
1313
);
1414

15+
// artificial delay to ensure cache entry updates
16+
await new Promise(res => setTimeout(res, 3000));
17+
1518
const cachedResp = await fetch(`${DEPLOYMENT_URL}/api/cache`);
1619
const cachedRespJson = await cachedResp.json();
1720

0 commit comments

Comments
 (0)