write mocha tests