rsnext/test/e2e/app-dir/actions/app-action-export.test.ts
Josh Story 5528cc6d4e
Remove the experimental serverActions flag (#57145)
Remove the experimental `serverActions` flag

Co-authored-by: Shu Ding <3676859+shuding@users.noreply.github.com>
Co-authored-by: Jiachi Liu <4800338+huozhi@users.noreply.github.com>
2023-10-20 20:45:25 +00:00

42 lines
876 B
TypeScript

import { createNextDescribe } from 'e2e-utils'
createNextDescribe(
'app-dir action handling - next export',
{
files: __dirname,
skipStart: true,
skipDeployment: true,
dependencies: {
react: 'latest',
'react-dom': 'latest',
'server-only': 'latest',
},
},
({ next, isNextStart }) => {
if (!isNextStart) {
it('skip test for dev mode', () => {})
return
}
beforeAll(async () => {
await next.stop()
await next.patchFile(
'next.config.js',
`
module.exports = {
output: 'export'
}
`
)
try {
await next.start()
} catch {}
})
it('should error when use export output for server actions', async () => {
expect(next.cliOutput).toContain(
`Server Actions are not supported with static export.`
)
})
}
)