npm-bin-ava-tester

1.1.0 • Public • Published

npm-bin-ava-tester.js npm AppVeyor Status Travis CI Status

ready-to-use ava tests for CLIs written with Node.js and NPM

What is this?

I designed this package for use with CLIs that are:

  • written in Node.js

  • published to NPM

  • already tested (or otherwise compatible) with ava

This package exports a single function that conveniently initialises some basic tests for you to ensure that:

  • you have at least a basic package.json file

  • your package.json file has valid "bin" references

  • your "bin" files all exist and are executable

  • your "bin" files all use UNIX-style LF line-endings, not CR or CRLF

  • your "bin" files all start with #! /usr/bin/env node

Usage

Example ava test file:

const test = require('ava')
const npmBinTester = require('npm-bin-ava-tester')
 
npmBinTester(test)

That's it!

Package Sidebar

Install

npm i npm-bin-ava-tester

Weekly Downloads

3

Version

1.1.0

License

MIT

Last publish

Collaborators

  • jokeyrhyme