converted to mocha tests