mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
## 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]>
28 lines
824 B
TypeScript
28 lines
824 B
TypeScript
import { nextTestSetup } from 'e2e-utils'
|
|
import { renderViaHTTP } from 'next-test-utils'
|
|
|
|
// Skip on Turbopack because it's not supported
|
|
;(process.env.IS_TURBOPACK_TEST ? describe.skip : describe)(
|
|
'webpack-issuer-deprecation-warning',
|
|
() => {
|
|
const { next } = nextTestSetup({
|
|
files: {
|
|
'pages/index.js': `
|
|
export default function Page() {
|
|
return <p>hello world
|
|
}
|
|
`,
|
|
},
|
|
dependencies: {},
|
|
})
|
|
|
|
it('should not appear deprecation warning about webpack module issuer', async () => {
|
|
const html = await renderViaHTTP(next.url, '/')
|
|
expect(html).toContain('Syntax Error')
|
|
expect(next.cliOutput).not.toContain(
|
|
'[DEP_WEBPACK_MODULE_ISSUER] DeprecationWarning: Module.issuer: Use new ModuleGraph API'
|
|
)
|
|
})
|
|
}
|
|
)
|