trial and errors are key to building anything new and innovative.
It sounds backwards because it really is
Test Driven Development is a coding practice where you write a test first then write the code to pass that test, usually in short iterative cycle.
It’s almost unanimous in the articles and studies on the internet these days: Test-driven development (henceforth, TDD) is the way developers should be creating everything. But if you’re like me, getting started is a lot harder than it sounds.
This is the first of maybe a couple of posts that I am going to be doing on testing React components and TDD in general. This one deals with setting up the Jest and Enzyme libraries and then writing a couple basic tests for a Login component. In my next posts hopefully I’ll go into a little more detail about these libraries and about how we can test more complex components that involve Redux. So with that let’s get started!
Photo by ShareGrid on Unsplash
It isn't about being diligent. It's because we've forgotten what we knew.
Your Practical Introduction to Test Driven Development
On my journey on Microverse, one of the things that troubled me the most to understand was RSpec, a Ruby gem for Test-Driven Development. The concept is quite simple. You create tests as you code along, so in the future, if an update breaks something, it will be easy to notice because one or more tests will fail.
When we start developing an app we usually do it the old fashion way: we get an idea, we elaborate on it, we make a plan to develop an app then we start coding and in the end, we test if our app is working properly.
Photo credit, HackerNoon AI