@@ -36,9 +36,11 @@ import {
3636} from '../utils/helpers.js'
3737import {
3838 hasDefaultTurbopackBuilds ,
39+ isExperimentalPPRHardDeprecated ,
3940 nextVersionSatisfies ,
4041 shouldHaveAppRouterGlobalErrorInPrerenderManifest ,
4142 shouldHaveAppRouterNotFoundInPrerenderManifest ,
43+ shouldHaveSlashIndexTagForIndexPage ,
4244} from '../utils/next-version-helpers.mjs'
4345
4446const mockedCp = cp as Mock < ( typeof import ( 'node:fs/promises' ) ) [ 'cp' ] >
@@ -205,7 +207,11 @@ test<FixtureTestContext>('index should be normalized within the cacheHandler and
205207 await runPlugin ( ctx )
206208 const index = await invokeFunction ( ctx , { url : '/' } )
207209 expect ( index . statusCode ) . toBe ( 200 )
208- expect ( index . headers ?. [ 'netlify-cache-tag' ] ) . toBe ( '_N_T_/layout,_N_T_/page,_N_T_/' )
210+ expect ( index . headers ?. [ 'netlify-cache-tag' ] ) . toBe (
211+ shouldHaveSlashIndexTagForIndexPage ( )
212+ ? '_N_T_/layout,_N_T_/page,_N_T_/,_N_T_/index'
213+ : '_N_T_/layout,_N_T_/page,_N_T_/' ,
214+ )
209215} )
210216
211217// with 15.0.0-canary.187 and later Next.js no longer produce `stale-while-revalidate` directive
@@ -398,7 +404,7 @@ test.skipIf(process.env.NEXT_VERSION !== 'canary')<FixtureTestContext>(
398404 '/1' ,
399405 '/2' ,
400406 '/404' ,
401- '/[dynamic]' ,
407+ isExperimentalPPRHardDeprecated ( ) ? undefined : '/[dynamic]' ,
402408 shouldHaveAppRouterGlobalErrorInPrerenderManifest ( ) ? '/_global-error' : undefined ,
403409 shouldHaveAppRouterNotFoundInPrerenderManifest ( ) ? '/_not-found' : undefined ,
404410 '/index' ,
0 commit comments