Just found a way to write React tests faster
Just found a way to write React tests faster!
Instead of writing tests from scratch, I'm writing Jest tests against my Storybook stories via this "testing-react" project: https://github.com/storybookjs/testing-react
This makes testing simpler:
1. Import the story.
2. Start asserting. No setup! 😍

Other wins:
✅ This incentivizes writing Storybook stories for all test scenarios, which leads to better docs
✅ I don't have to maintain setup code in Storybook and Jest. I just use the stories.
✅ The story gives me a visual, in browser example, even though I'm using Jest! 🔥