Upgrade to Pro — share decks privately, control downloads, hide ads and more …

0 to 0, refactoring with TDD

0 to 0, refactoring with TDD

Introduction presentation for TDD in node with refactoring as a context.

Code can be found at https://github.com/dmtrs/0-100refactoringwithTDD and steps are in tags.

Dimitrios Flaco Mengidis

December 17, 2015

Transcript

10 slides
  1. Why devs don’t write unit tests? • Writing unit test

    sucks • ☠☠☠ Deadlines ☠☠☠ • Not early established habit • Consequences of not writing tests ◦ are delayed ◦ suffered by other people
  2. Refactoring with TDD By continually re-running the test cases throughout

    each refactoring phase, the developer can be confident that process is not altering any existing functionality.
  3. Tools • Tape “tap-producing test harness for node and browsers”

    https://github.com/substack/tape • Istanbul “a JS code coverage tool written in JS” https://github.com/gotwarlost/istanbul
  4. Recap • Writing unit test should be easy • Accommodate

    time in your schedule • 0% to 100% a percent at a time
  5. Q&A

More Decks by Dimitrios Flaco Mengidis

Other Decks in Programming