FormidableLabs / jest-next-dynamic

Resolve Next.js dynamic import components in Jest tests
MIT License
69 stars 7 forks source link

Does this work with next8? #3

Closed natealcedo closed 5 years ago

natealcedo commented 5 years ago

I've been trying to find a way to test dynamic import components but nothing is working. Just wanted to know if this still works with next 8

exogen commented 5 years ago

We just discovered the other day that Next 8 does something sneaky and aliases next/dynamic to next-server/dynamic in its Babel plugin, which happens before Jest sees the code. I can update it to attempt both.