add coverage report and mocha test api.js