Switching to mocha and Fixing tests