add support for npm/mocha unit testing