[Javascript Testing] Add tests for StoryMedia #741
FeminismIsAwesome
started this conversation in
Temporarily Archived Tickets
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
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 StoryMedia.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 (media image vs audio image)
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.Beta Was this translation helpful? Give feedback.
All reactions