ixartz/Next-js-Boilerplate

How to start a Unit test and E2E

raja-prog opened this issue · 3 comments

I couldn't understand how to work with Cypress and JEST. help would be appreciated

ixartz commented

For unit testing with Jest, you just need to run npn run test and for e2e testing with Cypress, npm run e2e:headless

Thank you, one more doubt why we need to mock next/router? @ixartz

ixartz commented

Mocking next/router is needed to avoid errors when running tests.