
Functional Programming with Ian Schwartz - JSJ 574
JavaScript Jabber
Is React Testing Boilerplate a Good Idea?
I love React testing library but setting up a component with React testing library often involves boilerplate. If you can test a piece of functionality without having to have that boilerplate, the tests will run faster and be less difficult to read and write. That's a big part of why I really push for this. Sometimes if you're modeling your data in a functional way, creating an instance of that function to pass as a prop in the render function is not that hard. But sometimes you're passing things that are deeply nested JavaScript objects. And maybe there's five lines of code, ten lines of code at the top of the test file just creating foot props to pass down.
00:00
Transcript
Play full episode
Remember Everything You Learn from Podcasts
Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.