Skip to content

Commit 7a46c21

Browse files
committed
feat: update docs and tests
1 parent fb2f105 commit 7a46c21

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/DeduplicatedRequestHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { debug, debugVerbose } from './utils/debug';
1+
import { debugVerbose } from './utils/debug';
22
import { SyncedMap } from './SyncedMap';
33
export class DeduplicatedRequestHandler<
44
T extends (...args: [never, never]) => Promise<K>,

test/integration/next-app/src/app/api/nested-fetch-in-api-route/revalidated-fetch/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export async function GET() {
1010
`http://localhost:${process.env.NEXT_START_PORT || 3000}/api/uncached-fetch`,
1111
{
1212
next: {
13-
revalidate: 15,
14-
tags: ['revalidated-fetch-revalidate15-nested-fetch-in-api-route'],
13+
revalidate: 3,
14+
tags: ['revalidated-fetch-revalidate3-nested-fetch-in-api-route'],
1515
},
1616
},
1717
);

test/integration/next-app/src/app/revalidation-interface.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const apiRoutePaths: Record<string, string> = {
1414
// Define API routes with tags for tag-based revalidation
1515
const apiRouteTags: Record<string, string> = {
1616
'Revalidated Fetch in Nested API Route':
17-
'revalidated-fetch-revalidate15-nested-fetch-in-api-route',
17+
'revalidated-fetch-revalidate3-nested-fetch-in-api-route',
1818
'Revalidated Fetch API': 'revalidated-fetch-api',
1919
'Cached Static Fetch API': 'cached-static-fetch-api',
2020
'Uncached Fetch API': 'uncached-fetch-api',

test/integration/nextjs-cache-handler.integration.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -469,14 +469,14 @@ describe('Next.js Turbo Redis Cache Integration', () => {
469469
cacheEntryKey,
470470
);
471471
expect(JSON.parse(hashmap)).toEqual([
472-
'revalidated-fetch-revalidate15-nested-fetch-in-api-route',
472+
'revalidated-fetch-revalidate3-nested-fetch-in-api-route',
473473
]);
474474
});
475475

476476
it('A request to revalidateTag API should remove the route from redis (string and hashmap)', async () => {
477477
const revalidateRes = await fetch(
478478
NEXT_START_URL +
479-
'/api/revalidateTag?tag=revalidated-fetch-revalidate15-nested-fetch-in-api-route',
479+
'/api/revalidateTag?tag=revalidated-fetch-revalidate3-nested-fetch-in-api-route',
480480
);
481481
const revalidateResJson: any = await revalidateRes.json();
482482
expect(revalidateResJson.success).toBe(true);
@@ -530,7 +530,7 @@ describe('Next.js Turbo Redis Cache Integration', () => {
530530
cacheEntryKey,
531531
);
532532
expect(JSON.parse(hashmap)).toEqual([
533-
'revalidated-fetch-revalidate15-nested-fetch-in-api-route',
533+
'revalidated-fetch-revalidate3-nested-fetch-in-api-route',
534534
]);
535535
});
536536
}

0 commit comments

Comments
 (0)