Skip to content

Commit efa9787

Browse files
committed
fix: add test for behaviour
1 parent 3b2def8 commit efa9787

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/index.spec.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,16 @@ describe('onBuild()', () => {
727727
expect(existsSync(publicFile)).toBe(true)
728728
expect(await readJson(publicFile)).toMatchObject(expect.any(Array))
729729
})
730+
731+
it('does not split APIs when .nft.json files are unavailable', async () => {
732+
await moveNextDist()
733+
734+
await unlink(path.join(process.cwd(), '.next', 'next-server.js.nft.json'))
735+
736+
await nextRuntime.onBuild(defaultArgs)
737+
738+
expect(netlifyConfig.functions['_api_*'].node_bundler).toEqual('nft')
739+
})
730740
})
731741

732742
describe('onPostBuild', () => {

0 commit comments

Comments
 (0)