Files
4588a73542 Convert tests using createNext -> nextTestSetup (#93767)
## What?

Converts existing `createNext()` usage into `nextTestSetup()`. 

`createNext()` was the setup step we had before `nextTestSetup()` was
added.

This PR focused on the simple conversion cases. There will be a
follow-up to complete the last few.

---------

Co-authored-by: Cursor <[email protected]>
2026-05-12 13:16:31 +02:00

20 lines
554 B
TypeScript

import { join } from 'path'
import { FileRef, nextTestSetup } from 'e2e-utils'
import { fetchViaHTTP } from 'next-test-utils'
describe('trailingSlash:true with rewrites and getStaticProps', () => {
if ((global as any).isNextDeploy) {
it('should skip for deploy mode for now', () => {})
return
}
const { next } = nextTestSetup({
files: new FileRef(join(__dirname, './app')),
})
it('should work', async () => {
const res = await fetchViaHTTP(next.url, '/country')
expect(await res.text()).toContain('Welcome home')
})
})