Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 2 hours ago
JSON representation

An AVA helper that makes it easier to test CLIs using Execa

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