fixed mocha ttests to work correctly