Next.js Discord

Discord Forum

Best practices to test an app

Unanswered
Lionhead posted this in #help-forum
Open in Discord
LionheadOP
Hey ! i am currently developing my 1st web app using NextJS + Supabase and i never used tests for my app before. I don't really know what should i be testing on my website, and how? I've seen on the pages doc that jest + rtl can be used, but there is also playwright. Which one should i use ? I know that jest is more for unit testing, and playwright for integration testing. If i understand well, unit testing should check if a component have this or that, and integration testing would be for checking if parts of the website like logging in or submitting a form work ? i'm kinda confused

Last question, how do you guys organize your tests with the App directory, and which libs do you use? I'd be tempted to create a _tests folder for each page with stuff i wanna test, is it right ??

thanks a lot for helping me out!

0 Replies