next-international: Error when testing `TypeError: (0 , import_react2.cache) is not a function`
Hello,
I’m getting an TypeError: (0 , import_react2.cache) is not a function error while setting up the tests with next-international. Have you already see those types of error ?
About this issue
- Original URL
- State: open
- Created 9 months ago
- Comments: 23 (7 by maintainers)
For anyone out there struggling with testing for this I was able to get this working with all the following mocks
That’s my assumption. Either way, Next.js doesn’t have any documentation yet for testing Server Components or Client Components, and next-international doesn’t seem to be the issue here (you could use
cache(),useParams()… in application code too, and you’ll get the same errors even if you’re not using next-international).I guess we’ll have to wait for examples and documentation from Next.js, there is sadly nothing much that I can do.