added unit tests in mocha