rsnext/test/development/webpack-issuer-deprecation-warning/index.test.ts
await-ovo 864d401ee1
fix(next): use moduleGraph.getIssuer to avoid deprecation warning (#36329) (#36330)
fix: #36329 



## Bug

- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
2022-04-21 14:14:03 +00:00

29 lines
839 B
TypeScript

import { createNext } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { renderViaHTTP } from 'next-test-utils'
describe('webpack-issuer-deprecation-warning', () => {
let next: NextInstance
beforeAll(async () => {
next = await createNext({
files: {
'pages/index.js': `
export default function Page() {
return <p>hello world
}
`,
},
dependencies: {},
})
})
afterAll(() => next.destroy())
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'
)
})
})