@@ -364,9 +364,12 @@ describe("CacheHandler", () => {
364364 } ) ;
365365
366366 expect ( incrementalCache . set ) . toHaveBeenCalledWith (
367- "key" ,
367+ {
368+ baseKey : "key" ,
369+ cacheType : "cache" ,
370+ buildId : "undefined-build-id" ,
371+ } ,
368372 { type : "route" , body : "{}" , meta : { status : 200 , headers : { } } } ,
369- "cache" ,
370373 ) ;
371374 } ) ;
372375
@@ -381,13 +384,16 @@ describe("CacheHandler", () => {
381384 } ) ;
382385
383386 expect ( incrementalCache . set ) . toHaveBeenCalledWith (
384- "key" ,
387+ {
388+ baseKey : "key" ,
389+ cacheType : "cache" ,
390+ buildId : "undefined-build-id" ,
391+ } ,
385392 {
386393 type : "route" ,
387394 body : Buffer . from ( "{}" ) . toString ( "base64" ) ,
388395 meta : { status : 200 , headers : { "content-type" : "image/png" } } ,
389396 } ,
390- "cache" ,
391397 ) ;
392398 } ) ;
393399
@@ -401,13 +407,16 @@ describe("CacheHandler", () => {
401407 } ) ;
402408
403409 expect ( incrementalCache . set ) . toHaveBeenCalledWith (
404- "key" ,
410+ {
411+ baseKey : "key" ,
412+ cacheType : "cache" ,
413+ buildId : "undefined-build-id" ,
414+ } ,
405415 {
406416 type : "page" ,
407417 html : "<html></html>" ,
408418 json : { } ,
409419 } ,
410- "cache" ,
411420 ) ;
412421 } ) ;
413422
@@ -421,14 +430,17 @@ describe("CacheHandler", () => {
421430 } ) ;
422431
423432 expect ( incrementalCache . set ) . toHaveBeenCalledWith (
424- "key" ,
433+ {
434+ baseKey : "key" ,
435+ cacheType : "cache" ,
436+ buildId : "undefined-build-id" ,
437+ } ,
425438 {
426439 type : "app" ,
427440 html : "<html></html>" ,
428441 rsc : "rsc" ,
429442 meta : { status : 200 , headers : { } } ,
430443 } ,
431- "cache" ,
432444 ) ;
433445 } ) ;
434446
@@ -442,14 +454,17 @@ describe("CacheHandler", () => {
442454 } ) ;
443455
444456 expect ( incrementalCache . set ) . toHaveBeenCalledWith (
445- "key" ,
457+ {
458+ baseKey : "key" ,
459+ cacheType : "cache" ,
460+ buildId : "undefined-build-id" ,
461+ } ,
446462 {
447463 type : "app" ,
448464 html : "<html></html>" ,
449465 rsc : "rsc" ,
450466 meta : { status : 200 , headers : { } } ,
451467 } ,
452- "cache" ,
453468 ) ;
454469 } ) ;
455470
@@ -467,7 +482,11 @@ describe("CacheHandler", () => {
467482 } ) ;
468483
469484 expect ( incrementalCache . set ) . toHaveBeenCalledWith (
470- "key" ,
485+ {
486+ baseKey : "key" ,
487+ cacheType : "fetch" ,
488+ buildId : "undefined-build-id" ,
489+ } ,
471490 {
472491 kind : "FETCH" ,
473492 data : {
@@ -479,20 +498,22 @@ describe("CacheHandler", () => {
479498 } ,
480499 revalidate : 60 ,
481500 } ,
482- "fetch" ,
483501 ) ;
484502 } ) ;
485503
486504 it ( "Should set cache when for REDIRECT" , async ( ) => {
487505 await cache . set ( "key" , { kind : "REDIRECT" , props : { } } ) ;
488506
489507 expect ( incrementalCache . set ) . toHaveBeenCalledWith (
490- "key" ,
508+ {
509+ baseKey : "key" ,
510+ cacheType : "cache" ,
511+ buildId : "undefined-build-id" ,
512+ } ,
491513 {
492514 type : "redirect" ,
493515 props : { } ,
494516 } ,
495- "cache" ,
496517 ) ;
497518 } ) ;
498519
0 commit comments