conversion to mocha tests