DEV Community

Discussion on: Testing UI - Next JS, Typescript, Jest and React Testing Library

Collapse
 
maciekgrzybek profile image
Maciek Grzybek

Thanks :) Not sure if I understand correctly your question, but I also wrote something here - dev.to/maciekgrzybek/testing-ui-ne...

Collapse
 
doctorderek profile image
Dr. Derek Austin 🥳

Hey Maciek, thanks for the reply and the link, I already read that one too. I was asking how you prefer to test routes such as "/" or "/news" in Next. It looks like there's a "next-page-tester" library as well as a "next-test-api-routes-handler" -- have you tried either of those to test your _app.tsx and /pages/* files?

Thread Thread
 
maciekgrzybek profile image
Maciek Grzybek

Yep the article I've mentioned actually talks about testing routes with next-page-tester

Thread Thread
 
doctorderek profile image
Dr. Derek Austin 🥳

Ohhh got it. Sorry, the link in the comment took me back to this article, so I thought it was a different but similar article 🙈 Here's the correct link to your other piece dev.to/maciekgrzybek/testing-next-...

Thread Thread
 
maciekgrzybek profile image
Maciek Grzybek

My bad sorry :) :)