CodeWithAloha / HIERR

A Human-Centered Digital Engagement Process for the Hawai‘i Economic Recovery & Resilience Project with the State Office of Planning & Sustainable Development
https://hierr.vercel.app/
8 stars 7 forks source link

Add unit tests #198

Closed avenmia closed 5 days ago

avenmia commented 3 months ago

For this task, add Jest and React Testing Library to the project and add at least one test. References: https://jestjs.io/ https://testing-library.com/docs/react-testing-library/intro/

kobebuckley commented 1 month ago

I checked the Jest library and it is not fully compatible with Vite. It has some fixes that are currently in progress on the repo for vite-jest https://github.com/sodatea/vite-jest/tree/main/packages/vite-jest#limitations-and-differences-with-commonjs-tests and https://jestjs.io/docs/ecmascript-modules#differences-between-esm-and-commonjs which has a warning for using it.

I'll use the original Vitest https://vitest.dev/ that we mentioned before in the meeting to replace Jest due to the compatibility issue.