Closed FeminismIsAwesome closed 4 years ago
I'll take a stab at this one!
I think this issue is okay to closed, resolved in https://github.com/Terrastories/terrastories/pull/519? I'll make sure to link next time.
Ahh yes! Thanks for calling that out.
Background:
We would like more confidence, especially with desires to update the UI and add new map-facing features, that the javascript is rendering as expected. This is a good place for those new to the project to start getting familiar with the javascript end of things.
Let's add tests for the Card.jsx component!
Some suggestions for tests:
Adding an enzyme snapshot test (https://medium.com/codeclan/testing-react-with-jest-and-enzyme-20505fec4675) Asserting that different if-block renders render with the right data (different user roles) Testing interactions, like "when this clicks, this state changes"
Acceptance:
Running
docker-compose exec web yarn test
with the new tests does not break the javascript test suite.