updated tests with mocha