mocha unit tests for utils.js