Skip to content

Commit

Permalink
Fix test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Feb 19, 2025
1 parent e7b195c commit 7879349
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ describe('SharedCacheControls', () => {
it('should get cache control from in-memory cache', () => {
sharedCacheControls.set('/route1', { revalidate: 15 })
const cacheControl = sharedCacheControls.get('/route1')
expect(cacheControl).toBe({ revalidate: 15 })
expect(cacheControl).toEqual({ revalidate: 15 })
})

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

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

it('should clear the in-memory cache', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/server/lib/patch-fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ describe('createPatchedFetcher', () => {
fetchCache: true,
fetchIdx: 1,
fetchUrl: 'https://example.com/',
revalidate: false,
cacheControl: { revalidate: false },
tags: [],
}
)
Expand Down

0 comments on commit 7879349

Please sign in to comment.