Skip to content

Commit 02357e1

Browse files
committed
fix: tests
1 parent 31dcaa4 commit 02357e1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ describe('Next.js Turbo Redis Cache Integration', () => {
352352
counter = data1.counter;
353353
}
354354

355-
// API route counter of revalidated sub-fetch-request should be the same (request deduplication)
355+
// API route counter of revalidated sub-fetch-request should be the same (request deduplication of fetch requests)
356356
expect(data1.subFetchData.counter).toBe(data1.subFetchData.counter);
357357
subCounter = data1.subFetchData.counter;
358358
});
@@ -366,6 +366,7 @@ describe('Next.js Turbo Redis Cache Integration', () => {
366366
'/api/nested-fetch-in-api-route/revalidated-fetch',
367367
);
368368
const data: any = await res.json();
369+
console.log('data1', data);
369370
expect(data.counter).toBe(counter + 1);
370371
expect(data.subFetchData.counter).toBe(subCounter);
371372
});
@@ -388,6 +389,7 @@ describe('Next.js Turbo Redis Cache Integration', () => {
388389
'/api/nested-fetch-in-api-route/revalidated-fetch',
389390
);
390391
const data2: any = await res2.json();
392+
console.log('data2', data1, data2);
391393
expect(data2.counter).toBe(counter + 3);
392394
expect(data2.subFetchData.counter).toBe(subCounter + 1);
393395
});
@@ -421,8 +423,8 @@ describe('Next.js Turbo Redis Cache Integration', () => {
421423
'/api/nested-fetch-in-api-route/revalidated-fetch',
422424
);
423425
const data: any = await res.json();
426+
console.log('data3', data);
424427
expect(data.counter).toBe(counter + 4);
425-
// subFetchData counter should be 3 because the sub-fetch-request was re-evaluated. If revalidate would not work, it would be 2.
426428
expect(data.subFetchData.counter).toBe(subCounter + 2);
427429
});
428430

@@ -475,8 +477,8 @@ describe('Next.js Turbo Redis Cache Integration', () => {
475477
'/api/nested-fetch-in-api-route/revalidated-fetch',
476478
);
477479
const data: any = await res.json();
480+
console.log('data4', data);
478481
expect(data.counter).toBe(counter + 5);
479-
// subFetchData counter should be 4 because the sub-fetch-request was re-evaluated. If revalidate would not work, it would be 3.
480482
expect(data.subFetchData.counter).toBe(subCounter + 3);
481483
});
482484

0 commit comments

Comments
 (0)