while implementing next-router-mock into our testing setup, we realized that navigation with next/link does not work when using async.
I created a small reproduction repository (https://github.com/phil-tutti/next-link-repro), where we use next.js 13.5.6 and the latest next-router-mock (0.9.10). If you check it out and run yarn test or npm run test, you'll see the test fail, because the path is not as expected. When you remove async from both the import and MemoryRouterProvider, it works.
I created the repro based on the documentation of this repository.
Hello,
while implementing
next-router-mock
into our testing setup, we realized that navigation withnext/link
does not work when usingasync
.I created a small reproduction repository (https://github.com/phil-tutti/next-link-repro), where we use next.js 13.5.6 and the latest
next-router-mock
(0.9.10). If you check it out and runyarn test
ornpm run test
, you'll see the test fail, because the path is not as expected. When you removeasync
from both the import andMemoryRouterProvider
, it works. I created the repro based on the documentation of this repository.Thanks for your help