Skip to content

Commit 7879349

Browse files
committed
Fix test expectations
1 parent e7b195c commit 7879349

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/next/src/server/lib/incremental-cache/shared-cache-controls.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ describe('SharedCacheControls', () => {
4242
it('should get cache control from in-memory cache', () => {
4343
sharedCacheControls.set('/route1', { revalidate: 15 })
4444
const cacheControl = sharedCacheControls.get('/route1')
45-
expect(cacheControl).toBe({ revalidate: 15 })
45+
expect(cacheControl).toEqual({ revalidate: 15 })
4646
})
4747

4848
it('should get cache control from prerender manifest if not in cache', () => {
4949
const cacheControl = sharedCacheControls.get('/route2')
50-
expect(cacheControl).toBe({ revalidate: 20, expire: 40 })
50+
expect(cacheControl).toEqual({ revalidate: 20, expire: 40 })
5151
})
5252

5353
it('should return undefined if cache control not found', () => {
@@ -58,7 +58,7 @@ describe('SharedCacheControls', () => {
5858
it('should set cache control in cache', () => {
5959
sharedCacheControls.set('/route3', { revalidate: 30 })
6060
const cacheControl = sharedCacheControls.get('/route3')
61-
expect(cacheControl).toBe({ revalidate: 30 })
61+
expect(cacheControl).toEqual({ revalidate: 30 })
6262
})
6363

6464
it('should clear the in-memory cache', () => {

packages/next/src/server/lib/patch-fetch.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('createPatchedFetcher', () => {
8686
fetchCache: true,
8787
fetchIdx: 1,
8888
fetchUrl: 'https://example.com/',
89-
revalidate: false,
89+
cacheControl: { revalidate: false },
9090
tags: [],
9191
}
9292
)

0 commit comments

Comments
 (0)