So I spend my evening writing a library from scratch that implements some automation protocol.

You know they say NodeJS is a dependency hell… Well, I have exactly one dev dependency and that's mocha. Not more.

So what I learned today:
1. TDD is a quite interesting way to implement protocols.
2. The NodeJS core is quite powerful.
3. 100% test coverage is awesome. And for new projects quite achivable
4. You can easily test a net-server by using event emitter.

@laufi TDD is short for Test Driven Development.

It's a technique where you write your tests first , which of course fail in first place, and then write your application code in a minimal fashion to satisfy the test and make all your tests pass.

You usually use micro-cycles for it, so you write one test, implement the functionality to make the test green, refactor possible duplication, etc. and start over.

Sign in to participate in the conversation
Sheogorath's Microblog

This instance is the microblog to my blog. You'll probably find more recent content here while finding more elaborated content on the blog. Impressum / Datenschutz / Privacy