This kata contains a working babysteps timer. It can actually be used as a constraint when practicing TDD!
The idea is that writing a failing test and making
it green, should be possible within 2 minutes. If not, all changes should
be reverted (.e.g. git checkout
). The same holds for the refactoring phase.
Note that the babysteps timer can (should?) even be used during its own refactoring 😄
The constraint is to write tests for the babysteps timer before refactoring the Typescript code. A first example test has already been provided to get you started, but feel free to throw that (somewhat) useless test away!
I first read about this kata in 5 coding exercises to practice refactoring Legacy Code.