Photo by Joshua Hanson on Unsplash
1 min read
What we are going to build together is a simple Calculator API. When we POST an array of numbers e.g.
[2, 4] our API will add them together and return
6. It's simple so we keep our attention on testing.
Test-Driven Development is a programming practice where:
- Tests are written before operational code
- Operational Code is updated to make the tests pass
- Code is refactored to improve its design
This is commonly known as Red, Green and Refactor. It reminds me of traffic lights 🚥.
The plan is that I will create a blank repo and open PR's so you can see how we can evolve an API using tests.
If you would like to skip ahead, take a look at this Github repository.
See you soon.