added tests with mocha