Closed
Description
Bug report
Describe the bug
There's an error when trying to test a component which contains a dynamic imported component. The error i get is TypeError: require.resolveWeak is not a function
.
To Reproduce
- Clone the repo https://github.com/Emiliano-Bucci/jest-with-dynamic-import- (it's a fork of the repo
with-jest
example) - Run tests
Expected behavior
It should be possible to test components which contains dynamic imported components, or dynamic components itself.
Screenshots
System information
- OS: macOS 11.0.1
- Browser: Chrome 87.0.4280.88
- Version of Next.js: 10.0.3
- Version of Node.js: 12.14.1
- Deployment: Vercel
Activity