fixiing tests to work with mocha