rewrite mocha test same..