convert to mocha tests