The idea behind Test-Driven Development is quite simple.
Write a test BEFORE you implement your next bit of functionality
Write the minimal implementation needed to make your test pass
Refactor and re-structure what you've written so far as needed
Then just keep cycling through those 3 steps as you build out the rest of your project!
In the following video, we learn about the basics of Test-Driven Development (TDD) specifically in the landscape of developing APIs. We use ExpressJS, Jest, and supertest as our frameworks of choice here, but the fundamentals that you learn from this video can be applied in almost any scenario, regardless of what NodeJS or testing framework you are using.
Top comments (0)