@@ -104,7 +104,7 @@ test<FixtureTestContext>('Test that the simple next app is working', async (ctx)
104104 const blobEntries = await getBlobEntries ( ctx )
105105 expect ( blobEntries . map ( ( { key } ) => decodeBlobKey ( key ) ) . sort ( ) ) . toEqual (
106106 [
107- '/404' ,
107+ shouldHaveAppRouterNotFoundInPrerenderManifest ( ) ? undefined : '/404' ,
108108 shouldHaveAppRouterNotFoundInPrerenderManifest ( ) ? '/_not-found' : undefined ,
109109 '/api/cached-permanent' ,
110110 '/api/cached-revalidate' ,
@@ -392,41 +392,40 @@ test<FixtureTestContext>('rewrites to external addresses dont use compression',
392392 expect ( gunzipSync ( page . bodyBuffer ) . toString ( 'utf-8' ) ) . toContain ( '<title>Example Domain</title>' )
393393} )
394394
395- test . skipIf ( process . env . NEXT_VERSION !== 'canary' ) < FixtureTestContext > (
396- 'Test that a simple next app with PPR is working' ,
397- async ( ctx ) => {
398- await createFixture ( 'ppr' , ctx )
399- await runPlugin ( ctx )
400- // check if the blob entries where successful set on the build plugin
401- const blobEntries = await getBlobEntries ( ctx )
402- expect ( blobEntries . map ( ( { key } ) => decodeBlobKey ( key ) ) . sort ( ) ) . toEqual (
403- [
404- '/1' ,
405- '/2' ,
406- '/404' ,
407- isExperimentalPPRHardDeprecated ( ) ? undefined : '/[dynamic]' ,
408- shouldHaveAppRouterGlobalErrorInPrerenderManifest ( ) ? '/_global-error' : undefined ,
409- shouldHaveAppRouterNotFoundInPrerenderManifest ( ) ? '/_not-found' : undefined ,
410- '/index' ,
411- '404.html' ,
412- '500.html' ,
413- ] . filter ( Boolean ) ,
414- )
395+ test . skipIf (
396+ process . env . NEXT_VERSION !== 'canary' && nextVersionSatisfies ( '<16.0.0' ) ,
397+ ) < FixtureTestContext > ( 'Test that a simple next app with PPR is working' , async ( ctx ) => {
398+ await createFixture ( 'ppr' , ctx )
399+ await runPlugin ( ctx )
400+ // check if the blob entries where successful set on the build plugin
401+ const blobEntries = await getBlobEntries ( ctx )
402+ expect ( blobEntries . map ( ( { key } ) => decodeBlobKey ( key ) ) . sort ( ) ) . toEqual (
403+ [
404+ '/1' ,
405+ '/2' ,
406+ shouldHaveAppRouterNotFoundInPrerenderManifest ( ) ? undefined : '/404' ,
407+ isExperimentalPPRHardDeprecated ( ) ? undefined : '/[dynamic]' ,
408+ shouldHaveAppRouterGlobalErrorInPrerenderManifest ( ) ? '/_global-error' : undefined ,
409+ shouldHaveAppRouterNotFoundInPrerenderManifest ( ) ? '/_not-found' : undefined ,
410+ '/index' ,
411+ '404.html' ,
412+ '500.html' ,
413+ ] . filter ( Boolean ) ,
414+ )
415415
416- // test the function call
417- const home = await invokeFunction ( ctx )
418- expect ( home . statusCode ) . toBe ( 200 )
419- expect ( load ( home . body ) ( 'h1' ) . text ( ) ) . toBe ( 'Home' )
416+ // test the function call
417+ const home = await invokeFunction ( ctx )
418+ expect ( home . statusCode ) . toBe ( 200 )
419+ expect ( load ( home . body ) ( 'h1' ) . text ( ) ) . toBe ( 'Home' )
420420
421- const dynamicPrerendered = await invokeFunction ( ctx , { url : '/1' } )
422- expect ( dynamicPrerendered . statusCode ) . toBe ( 200 )
423- expect ( load ( dynamicPrerendered . body ) ( 'h1' ) . text ( ) ) . toBe ( 'Dynamic Page: 1' )
421+ const dynamicPrerendered = await invokeFunction ( ctx , { url : '/1' } )
422+ expect ( dynamicPrerendered . statusCode ) . toBe ( 200 )
423+ expect ( load ( dynamicPrerendered . body ) ( 'h1' ) . text ( ) ) . toBe ( 'Dynamic Page: 1' )
424424
425- const dynamicNotPrerendered = await invokeFunction ( ctx , { url : '/3' } )
426- expect ( dynamicNotPrerendered . statusCode ) . toBe ( 200 )
427- expect ( load ( dynamicNotPrerendered . body ) ( 'h1' ) . text ( ) ) . toBe ( 'Dynamic Page: 3' )
428- } ,
429- )
425+ const dynamicNotPrerendered = await invokeFunction ( ctx , { url : '/3' } )
426+ expect ( dynamicNotPrerendered . statusCode ) . toBe ( 200 )
427+ expect ( load ( dynamicNotPrerendered . body ) ( 'h1' ) . text ( ) ) . toBe ( 'Dynamic Page: 3' )
428+ } )
430429
431430// setup for this test only works with webpack builds due to usage of ` __non_webpack_require__` to avoid bundling a file
432431test . skipIf ( hasDefaultTurbopackBuilds ( ) ) < FixtureTestContext > (
0 commit comments