https://github.com/ianwalter/execa-helper
An AVA helper that makes it easier to test CLIs using Execa
https://github.com/ianwalter/execa-helper
ava execa helper
Last synced: 3 months ago
JSON representation
An AVA helper that makes it easier to test CLIs using Execa
- Host: GitHub
- URL: https://github.com/ianwalter/execa-helper
- Owner: ianwalter
- License: other
- Created: 2019-01-27T16:38:10.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-29T10:29:07.000Z (almost 7 years ago)
- Last Synced: 2025-03-13T11:40:26.619Z (about 1 year ago)
- Topics: ava, execa, helper
- Language: JavaScript
- Size: 209 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @ianwalter/execa-helper
> An [AVA][avaUrl] helper that makes it easier to test CLIs using
> [Execa][execaUrl]
[![npm page][npmImage]][npmUrl]
## Installation
```console
yarn add @ianwalter/execa-helper --dev
```
## Usage
```js
import test from 'ava'
import execaHelper from '@ianwalter/execa-helper'
const withCli = execaHelper('./cli.js')
test('my cli runs without errors', withCli, async (t, cli) => {
const { stdout } = await cli('run', '--with', 'stuff')
t.snapshot(stdout)
})
```
## API
## License
Apache 2.0 with Commons Clause - See [LICENSE][licenseUrl]
Created by [Ian Walter](https://iankwalter.com)
[avaUrl]: https://github.com/avajs/ava
[execaUrl]: https://github.com/sindresorhus/execa
[npmImage]: https://img.shields.io/npm/v/@ianwalter/execa-helper.svg
[npmUrl]: https://www.npmjs.com/package/@ianwalter/execa-helper
[licenseUrl]: https://github.com/ianwalter/execa-helper/blob/master/LICENSE