@@ -93,7 +93,7 @@ describe('S3Cache', () => {
9393 ContentType : 'application/json'
9494 } )
9595
96- const result = await s3Cache . get ( cacheKey , cacheKey )
96+ const result = await s3Cache . get ( cacheKey , cacheKey , mockCacheContext )
9797 expect ( result ) . toEqual ( mockCacheEntry . value . pageData )
9898 expect ( s3Cache . client . getObject ) . toHaveBeenCalledTimes ( 1 )
9999 expect ( s3Cache . client . getObject ) . toHaveBeenCalledWith ( {
@@ -118,7 +118,7 @@ describe('S3Cache', () => {
118118 ContentType : 'text/x-component'
119119 } )
120120
121- const result = await s3Cache . get ( cacheKey , cacheKey )
121+ const result = await s3Cache . get ( cacheKey , cacheKey , mockCacheContext )
122122 expect ( result ) . toEqual ( mockCacheEntry . value . pageData )
123123 expect ( s3Cache . client . getObject ) . toHaveBeenCalledTimes ( 1 )
124124 expect ( s3Cache . client . getObject ) . toHaveBeenCalledWith ( {
@@ -143,7 +143,7 @@ describe('S3Cache', () => {
143143 ContentType : 'application/json'
144144 } )
145145
146- const result = await s3Cache . get ( cacheKey , cacheKey )
146+ const result = await s3Cache . get ( cacheKey , cacheKey , mockCacheContext )
147147 expect ( result ) . toEqual ( mockCacheEntry . value . pageData )
148148 expect ( s3Cache . client . getObject ) . toHaveBeenCalledTimes ( 1 )
149149 expect ( s3Cache . client . getObject ) . toHaveBeenCalledWith ( {
@@ -152,7 +152,7 @@ describe('S3Cache', () => {
152152 } )
153153
154154 await s3Cache . delete ( cacheKey , cacheKey )
155- const updatedResult = await s3Cache . get ( cacheKey , cacheKey )
155+ const updatedResult = await s3Cache . get ( cacheKey , cacheKey , mockCacheContext )
156156 expect ( updatedResult ) . toBeNull ( )
157157 expect ( s3Cache . client . deleteObjects ) . toHaveBeenCalledTimes ( 1 )
158158 expect ( s3Cache . client . deleteObjects ) . toHaveBeenNthCalledWith ( 1 , {
@@ -171,19 +171,19 @@ describe('S3Cache', () => {
171171 const mockCacheEntryWithTags = { ...mockCacheEntry , tags : [ cacheKey ] }
172172 await s3Cache . set ( cacheKey , cacheKey , mockCacheEntryWithTags , mockCacheContext )
173173
174- expect ( await s3Cache . get ( cacheKey , cacheKey ) ) . toEqual ( mockCacheEntryWithTags . value . pageData )
174+ expect ( await s3Cache . get ( cacheKey , cacheKey , mockCacheContext ) ) . toEqual ( mockCacheEntryWithTags . value . pageData )
175175
176176 await s3Cache . revalidateTag ( cacheKey , [ ] )
177177
178- expect ( await s3Cache . get ( cacheKey , cacheKey ) ) . toBeNull ( )
178+ expect ( await s3Cache . get ( cacheKey , cacheKey , mockCacheContext ) ) . toBeNull ( )
179179 } )
180180
181181 it ( 'should revalidate cache by path' , async ( ) => {
182182 await s3Cache . set ( cacheKey , cacheKey , mockCacheEntry , mockCacheContext )
183183
184- expect ( await s3Cache . get ( cacheKey , cacheKey ) ) . toEqual ( mockCacheEntry . value . pageData )
184+ expect ( await s3Cache . get ( cacheKey , cacheKey , mockCacheContext ) ) . toEqual ( mockCacheEntry . value . pageData )
185185
186186 await s3Cache . deleteAllByKeyMatch ( cacheKey , [ ] )
187- expect ( await s3Cache . get ( cacheKey , cacheKey ) ) . toBeNull ( )
187+ expect ( await s3Cache . get ( cacheKey , cacheKey , mockCacheContext ) ) . toBeNull ( )
188188 } )
189189} )
0 commit comments