Skip to content

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

License

Notifications You must be signed in to change notification settings

ianwalter/execa-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@ianwalter/execa-helper

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

npm page

Installation

yarn add @ianwalter/execa-helper --dev

Usage

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

 

Created by Ian Walter