项目作者: ianwalter

项目描述 :
An AVA helper that makes it easier to test CLIs using Execa
高级语言: JavaScript
项目地址: git://github.com/ianwalter/execa-helper.git
创建时间: 2019-01-27T16:38:10Z
项目社区:https://github.com/ianwalter/execa-helper

开源协议:Other

下载


@ianwalter/execa-helper

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

npm page

Installation

  1. yarn add @ianwalter/execa-helper --dev

Usage

  1. import test from 'ava'
  2. import execaHelper from '@ianwalter/execa-helper'
  3. const withCli = execaHelper('./cli.js')
  4. test('my cli runs without errors', withCli, async (t, cli) => {
  5. const { stdout } = await cli('run', '--with', 'stuff')
  6. t.snapshot(stdout)
  7. })

API

License

Apache 2.0 with Commons Clause - See LICENSE

Created by Ian Walter