ManpreetSL / habit-tracker

Group habit tracker
habit-tracker-omega.vercel.app
MIT License
0 stars 0 forks source link

Add smoke tests for existing components #44

Closed ManpreetSL closed 1 year ago

ManpreetSL commented 1 year ago

Summary

We want to automatically test that each component loads and is rendered.

Approach

Notes

https://testing-library.com/docs/react-testing-library/example-intro/#quickstart

ManpreetSL commented 1 year ago

ViewHabits hasn't been merged into main yet, so we'll just test what we can for this branch (from main), and then smoke testing ViewHabits can be done in the branch it's in.

ManpreetSL commented 1 year ago

Test setup is seemingly faulty - Can't run .tsx test files for some reason.

ManpreetSL commented 1 year ago

Will also need to add a workaround for Next.js so that it doesn't serve the test files as pages: https://stackoverflow.com/questions/70832134/is-it-possible-to-put-test-files-under-pages-directory-in-next-js