@@ -82,7 +82,7 @@ describe('page router', () => {
8282 countOfBlobServerGetsForKey ( ctx , '/static/revalidate-automatic' ) ,
8383 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
8484 ) . toBe ( 1 )
85- ctx . blobServerGetSpy . mockClear ( )
85+ ctx . blobServerOnRequestSpy . mockClear ( )
8686
8787 // wait to have page regenerated in the background
8888 await new Promise < void > ( ( resolve ) => setTimeout ( resolve , 1000 ) )
@@ -116,7 +116,7 @@ describe('page router', () => {
116116 countOfBlobServerGetsForKey ( ctx , '/static/revalidate-automatic' ) ,
117117 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
118118 ) . toBe ( 1 )
119- ctx . blobServerGetSpy . mockClear ( )
119+ ctx . blobServerOnRequestSpy . mockClear ( )
120120
121121 // ping that should serve the stale page for static/revalidate-slow, while revalidating in background
122122 await invokeFunction ( ctx , { url : 'static/revalidate-slow' } )
@@ -125,7 +125,7 @@ describe('page router', () => {
125125 countOfBlobServerGetsForKey ( ctx , '/static/revalidate-slow' ) ,
126126 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
127127 ) . toBe ( 1 )
128- ctx . blobServerGetSpy . mockClear ( )
128+ ctx . blobServerOnRequestSpy . mockClear ( )
129129
130130 // wait to have a stale page
131131 await new Promise < void > ( ( resolve ) => setTimeout ( resolve , 6_000 ) )
@@ -136,7 +136,7 @@ describe('page router', () => {
136136 countOfBlobServerGetsForKey ( ctx , '/static/revalidate-slow' ) ,
137137 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
138138 ) . toBe ( 1 )
139- ctx . blobServerGetSpy . mockClear ( )
139+ ctx . blobServerOnRequestSpy . mockClear ( )
140140
141141 // over 5 seconds since it was regenerated, so we should get stale response,
142142 // while fresh is generated in the background
@@ -160,7 +160,7 @@ describe('page router', () => {
160160 countOfBlobServerGetsForKey ( ctx , '/static/revalidate-automatic' ) ,
161161 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
162162 ) . toBe ( 1 )
163- ctx . blobServerGetSpy . mockClear ( )
163+ ctx . blobServerOnRequestSpy . mockClear ( )
164164
165165 // Slow revalidate should still be a hit, but the maxage should be updated
166166 const callLater2 = await invokeFunction ( ctx , { url : 'static/revalidate-slow' } )
@@ -177,7 +177,7 @@ describe('page router', () => {
177177 countOfBlobServerGetsForKey ( ctx , '/static/revalidate-slow' ) ,
178178 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
179179 ) . toBe ( 1 )
180- ctx . blobServerGetSpy . mockClear ( )
180+ ctx . blobServerOnRequestSpy . mockClear ( )
181181
182182 // it does not wait for the cache.set so we have to manually wait here until the blob storage got populated
183183 await new Promise < void > ( ( resolve ) => setTimeout ( resolve , 1000 ) )
@@ -204,7 +204,7 @@ describe('page router', () => {
204204 countOfBlobServerGetsForKey ( ctx , '/static/revalidate-automatic' ) ,
205205 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
206206 ) . toBe ( 1 )
207- ctx . blobServerGetSpy . mockClear ( )
207+ ctx . blobServerOnRequestSpy . mockClear ( )
208208 } )
209209} )
210210
@@ -245,7 +245,7 @@ describe('app router', () => {
245245 countOfBlobServerGetsForKey ( ctx , '/posts/1' ) ,
246246 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
247247 ) . toBe ( 1 )
248- ctx . blobServerGetSpy . mockClear ( )
248+ ctx . blobServerOnRequestSpy . mockClear ( )
249249
250250 // test a prerendered page without TTL
251251 const post2 = await invokeFunction ( ctx , { url : '/' } )
@@ -263,7 +263,7 @@ describe('app router', () => {
263263 countOfBlobServerGetsForKey ( ctx , '/index' ) ,
264264 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
265265 ) . toBe ( 1 )
266- ctx . blobServerGetSpy . mockClear ( )
266+ ctx . blobServerOnRequestSpy . mockClear ( )
267267
268268 expect ( await ctx . blobStore . get ( encodeBlobKey ( '/posts/3' ) ) ) . toBeNull ( )
269269 // this page is not pre-rendered and should result in a cache miss
@@ -293,7 +293,7 @@ describe('app router', () => {
293293 countOfBlobServerGetsForKey ( ctx , '/posts/1' ) ,
294294 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
295295 ) . toBe ( 1 )
296- ctx . blobServerGetSpy . mockClear ( )
296+ ctx . blobServerOnRequestSpy . mockClear ( )
297297 // it should've been regenerated in the background after the first call
298298 // so the date should be different
299299 expect ( staleDate , 'the date was cached and is matching the initial one' ) . not . toBe ( post1Date )
@@ -320,7 +320,7 @@ describe('app router', () => {
320320 countOfBlobServerGetsForKey ( ctx , '/posts/1' ) ,
321321 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
322322 ) . toBe ( 1 )
323- ctx . blobServerGetSpy . mockClear ( )
323+ ctx . blobServerOnRequestSpy . mockClear ( )
324324 } )
325325
326326 test < FixtureTestContext > ( "not-prerendered pages should be permanently cached when produced by sandboxed invocations that don't share memory" , async ( ctx ) => {
@@ -405,7 +405,7 @@ describe('route', () => {
405405 } )
406406 expect ( blobEntry ) . not . toBeNull ( )
407407
408- ctx . blobServerGetSpy . mockClear ( )
408+ ctx . blobServerOnRequestSpy . mockClear ( )
409409
410410 // test the first invocation of the route - we should get stale response while fresh is generated in the background
411411 const call1 = await invokeFunction ( ctx , { url : '/api/revalidate-handler' } )
@@ -428,7 +428,7 @@ describe('route', () => {
428428 countOfBlobServerGetsForKey ( ctx , '/api/revalidate-handler' ) ,
429429 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
430430 ) . toBe ( 1 )
431- ctx . blobServerGetSpy . mockClear ( )
431+ ctx . blobServerOnRequestSpy . mockClear ( )
432432
433433 // it does not wait for the cache.set so we have to manually wait here until the blob storage got populated
434434 await new Promise < void > ( ( resolve ) => setTimeout ( resolve , 1000 ) )
@@ -458,7 +458,7 @@ describe('route', () => {
458458 countOfBlobServerGetsForKey ( ctx , '/api/revalidate-handler' ) ,
459459 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
460460 ) . toBe ( 1 )
461- ctx . blobServerGetSpy . mockClear ( )
461+ ctx . blobServerOnRequestSpy . mockClear ( )
462462
463463 // wait to have a stale route again
464464 await new Promise < void > ( ( resolve ) => setTimeout ( resolve , 8_000 ) )
@@ -485,7 +485,7 @@ describe('route', () => {
485485 countOfBlobServerGetsForKey ( ctx , '/api/revalidate-handler' ) ,
486486 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
487487 ) . toBe ( 1 )
488- ctx . blobServerGetSpy . mockClear ( )
488+ ctx . blobServerOnRequestSpy . mockClear ( )
489489
490490 // it does not wait for the cache.set so we have to manually wait here until the blob storage got populated
491491 await new Promise < void > ( ( resolve ) => setTimeout ( resolve , 1000 ) )
@@ -510,7 +510,7 @@ describe('route', () => {
510510 countOfBlobServerGetsForKey ( ctx , '/api/revalidate-handler' ) ,
511511 'should only try to get value once from blob store (date calculation should not trigger additional blobs.get)' ,
512512 ) . toBe ( 1 )
513- ctx . blobServerGetSpy . mockClear ( )
513+ ctx . blobServerOnRequestSpy . mockClear ( )
514514 } )
515515
516516 test < FixtureTestContext > ( 'cacheable route handler response not produced at build is served correctly' , async ( ctx ) => {
0 commit comments