Async wrapper for mocha
npm install amochaamocha
==========
[![Build Status][bd_travis_shield_url]][bd_travis_url]
[![npm Version][bd_npm_shield_url]][bd_npm_url]
[![JS Standard][bd_standard_shield_url]][bd_standard_url]
[bd_repo_url]: https://github.com/a-labo/amocha
[bd_travis_url]: http://travis-ci.org/a-labo/amocha
[bd_travis_shield_url]: http://img.shields.io/travis/a-labo/amocha.svg?style=flat
[bd_travis_com_url]: http://travis-ci.com/a-labo/amocha
[bd_travis_com_shield_url]: https://api.travis-ci.com/a-labo/amocha.svg?token=
[bd_license_url]: https://github.com/a-labo/amocha/blob/master/LICENSE
[bd_codeclimate_url]: http://codeclimate.com/github/a-labo/amocha
[bd_codeclimate_shield_url]: http://img.shields.io/codeclimate/github/a-labo/amocha.svg?style=flat
[bd_codeclimate_coverage_shield_url]: http://img.shields.io/codeclimate/coverage/github/a-labo/amocha.svg?style=flat
[bd_gemnasium_url]: https://gemnasium.com/a-labo/amocha
[bd_gemnasium_shield_url]: https://gemnasium.com/a-labo/amocha.svg
[bd_npm_url]: http://www.npmjs.org/package/amocha
[bd_npm_shield_url]: http://img.shields.io/npm/v/amocha.svg?style=flat
[bd_standard_url]: http://standardjs.com/
[bd_standard_shield_url]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg
Async wrapper for mocha
Installation
-----
``bash`
$ npm install amocha --save
Usage
---------
`javascript
'use strict'
const amocha = require('amocha')
;(async () => {
// Run tests
await amocha('test/*/_test.js', {})
// Measure coverage
await amocha.coverage('test/*/_test.js', {
dir: 'coverage'
})
}).catch((err) => console.error(err))
`
Signature
---------
amocha(pattern, options, reporter) -> Promise`
| Name | Type | Description |
| ----- | --- | -------- |
| pattern | string | Glob file name pattern |
| options | Object | Optional settings |
| reporter | string | |
| options.cwd | string | Working directory path |
| options.reporter | string | Mocha reporter |
| options.timeout | number | Timeout duration |
License
-------
This software is released under the MIT License.
Links
------