Chapter 9: Node Testing for Beginners

by M. David Green

Does testing seem like an unwelcome intrusion on your development work day? Don’t worry, I get it.

If you started out not writing tests as part of your development process, testing can seem weird and complex. That’s especially true when you want to believe you’ve already got everything working. Nobody enjoys being confronted with proof of how brittle all the complex and intricate code they’ve spent the last few days (or years) polishing and perfecting might be.

Testing conjures up the need for a whole new parallel codebase, perhaps as large as the one you already have, in an unfamiliar syntax. And the notion of test-driven development might force you to think through your requirements results-first ...

Get Your First Week With Node.js, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.