diff --git a/tests/integration/cache-handler.test.ts b/tests/integration/cache-handler.test.ts index b3910f8e62..eddbc6fe45 100644 --- a/tests/integration/cache-handler.test.ts +++ b/tests/integration/cache-handler.test.ts @@ -212,14 +212,17 @@ describe('app router', () => { console.timeEnd('runPlugin') // check if the blob entries where successful set on the build plugin const blobEntries = await getBlobEntries(ctx) - expect(blobEntries.map(({ key }) => decodeBlobKey(key)).sort()).toEqual([ - '/404', - '/index', - '/posts/1', - '/posts/2', - '404.html', - '500.html', - ]) + expect(blobEntries.map(({ key }) => decodeBlobKey(key)).sort()).toEqual( + [ + '/404', + nextVersionSatisfies('>=15.4.2-canary.33') ? '/_not-found' : undefined, + '/index', + '/posts/1', + '/posts/2', + '404.html', + '500.html', + ].filter(Boolean), + ) // test the function call const post1 = await invokeFunction(ctx, { url: 'posts/1' }) @@ -362,23 +365,26 @@ describe('plugin', () => { await runPlugin(ctx) // check if the blob entries where successful set on the build plugin const blobEntries = await getBlobEntries(ctx) - expect(blobEntries.map(({ key }) => decodeBlobKey(key)).sort()).toEqual([ - '/404', - '/api/revalidate-handler', - '/api/static/first', - '/api/static/second', - '/api/zero-length-response', - '/index', - '/product/事前レンダリング,test', - '/revalidate-fetch', - '/static-fetch-1', - '/static-fetch-2', - '/static-fetch-3', - '/static-fetch/1', - '/static-fetch/2', - '404.html', - '500.html', - ]) + expect(blobEntries.map(({ key }) => decodeBlobKey(key)).sort()).toEqual( + [ + '/404', + nextVersionSatisfies('>=15.4.2-canary.33') ? '/_not-found' : undefined, + '/api/revalidate-handler', + '/api/static/first', + '/api/static/second', + '/api/zero-length-response', + '/index', + '/product/事前レンダリング,test', + '/revalidate-fetch', + '/static-fetch-1', + '/static-fetch-2', + '/static-fetch-3', + '/static-fetch/1', + '/static-fetch/2', + '404.html', + '500.html', + ].filter(Boolean), + ) }) }) diff --git a/tests/integration/simple-app.test.ts b/tests/integration/simple-app.test.ts index 6fc02f387c..ced22a09a0 100644 --- a/tests/integration/simple-app.test.ts +++ b/tests/integration/simple-app.test.ts @@ -95,26 +95,29 @@ test('Test that the simple next app is working', async (ctx) await runPlugin(ctx) // check if the blob entries where successful set on the build plugin const blobEntries = await getBlobEntries(ctx) - expect(blobEntries.map(({ key }) => decodeBlobKey(key)).sort()).toEqual([ - '/404', - '/api/cached-permanent', - '/api/cached-revalidate', - '/config-redirect', - '/config-redirect/dest', - '/config-rewrite', - '/config-rewrite/dest', - '/image/local', - '/image/migration-from-v4-runtime', - '/image/remote-domain', - '/image/remote-pattern-1', - '/image/remote-pattern-2', - '/index', - '/other', - '/route-resolves-to-not-found', - '404.html', - '500.html', - 'fully-static.html', - ]) + expect(blobEntries.map(({ key }) => decodeBlobKey(key)).sort()).toEqual( + [ + '/404', + nextVersionSatisfies('>=15.4.2-canary.33') ? '/_not-found' : undefined, + '/api/cached-permanent', + '/api/cached-revalidate', + '/config-redirect', + '/config-redirect/dest', + '/config-rewrite', + '/config-rewrite/dest', + '/image/local', + '/image/migration-from-v4-runtime', + '/image/remote-domain', + '/image/remote-pattern-1', + '/image/remote-pattern-2', + '/index', + '/other', + '/route-resolves-to-not-found', + '404.html', + '500.html', + 'fully-static.html', + ].filter(Boolean), + ) // test the function call const home = await invokeFunction(ctx) @@ -385,12 +388,15 @@ test.skipIf(process.env.NEXT_VERSION !== 'canary')( await runPlugin(ctx) // check if the blob entries where successful set on the build plugin const blobEntries = await getBlobEntries(ctx) - expect(blobEntries.map(({ key }) => decodeBlobKey(key)).sort()).toEqual([ - '/404', - '/index', - '404.html', - '500.html', - ]) + expect(blobEntries.map(({ key }) => decodeBlobKey(key)).sort()).toEqual( + [ + '/404', + nextVersionSatisfies('>=15.4.2-canary.33') ? '/_not-found' : undefined, + '/index', + '404.html', + '500.html', + ].filter(Boolean), + ) // test the function call const home = await invokeFunction(ctx)