-
Notifications
You must be signed in to change notification settings - Fork 1
Frontend Tests
Dinith edited this page May 24, 2020
·
2 revisions
All React components were tested, apart from those with React.useContext()
calls. We had difficulty mocking this due to its complexity. Such components are notorious for being this way. Tests were made for other components, including those using React.useHistory()
. This required the following:
- Snapshot testing using
jest
- Shallow testing using
enzyme
in some cases - Surrounding tested components that call
React.useHistory()
withMemoryRouter
fromreact-router-dom