Test Driven Node.js Development
Join the DZone community and get the full member experience.
Join For FreeWhat would a language and framework be with unit testing, BDD, and other testing methods, frameworks and systems?
So once you get beyond casual Node.JS development, you will need to start unit testing. Node.js has a surprisingly robust and mature set of testing tools and options. Out of the box, Node.js has Built In Assert which will let you do some basic XUnit style tests. A step beyond that is NodeUnit, which is pretty easy to use for XUnit oriented people. For me, it’s easy to pick up coming from doing a lot of JUnit tests. This article is great for Using NodeUnit for Testing. Node.js is great because so many people have developed tools, frameworks and utilities for it. The only issue I have it some are not very mature and the options are so fragmented. There’s no Spring framework or hibernate that garners massive usage. So many variations and options, I wish they could work together to put together a killer Rails or Spring type group of mature, tested, interconnected tools and utilities. Full Testing Suite – Mocha is installable via NPM and works with a CI server. This one is pretty cool.
Published at DZone with permission of Tim Spann, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments