A useful testing resource for node.js

January 1, 2016

I recently got to adding a test suite to an established module I had developed for work. The following resource was especially helpful in pointing me in the right direction:

Unit testing, the Clock way

Briefly outlined, the modules I started using:

  • Mocha - test framework
  • should.js - assertion library
  • Nock - http request interception and mocking
  • supertest - http server endpoint testing
  • Istanbul - a code coverage tool
  • jshint - javascript linting
  • JSCS - code style enforcing

Next step - a continuous integration server that plays well with gitlab merge requests.