finish mocha test/* rewrite