test-executor
Version:
Executes test scripts in the specified dirs.
37 lines (24 loc) • 1.09 kB
Markdown
# node-test-executor
[![NPM Version][npm-image]][npm-url]
[](https://travis-ci.org/Guseyn/node-test-executor)
[](https://codecov.io/gh/Guseyn/node-test-executor)
Executes test scripts and directories of test scripts. It's based on [Async Tree Pattern](https://github.com/Guseyn/async-tree-patern/blob/master/Async_Tree_Patern.pdf).
## Install
`npm i test-executor`
## How to use
```js
const { ExecutedTests } = require('test-executor')
new ExecutedTests(
'./test/test.js', './test/dir1', './test/dir2'
).call() // or just new ExecutedTests('./test').call()
```
Output will be smth like this (example of case when one of the tests fails):

[npm-image]: https://img.shields.io/npm/v/test-executor.svg
[npm-url]: https://npmjs.org/package/test-executor
## Test
`npm run test`
## Build
`npm run build`
## Run example
`npm run example`