Embed presentation
Download as PDF, PPTX


















This document discusses test-driven development (TDD) with Node.js. TDD involves writing failing tests before code, making tests pass by writing the minimum code, and then refactoring. Using TDD can lead to less fear of change, increased productivity, better communication, improved design, and fewer bugs. Tests should start at the public interface and mock dependencies. Tests should keep it simple and focus on the interface being tested. Tools like proxyquire and Sinon can help with dependency injection and spies/stubs, while Istanbul can measure code coverage, though coverage alone does not mean code is tested. Overall, TDD concepts are more important than specific tools.
















