Converting unit tests to mocha