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

https://github.com/arve0/tty-test-helper

Test interactive terminal applications
https://github.com/arve0/tty-test-helper

Last synced: 3 months ago
JSON representation

Test interactive terminal applications

Awesome Lists containing this project

README

        

[![npm version](https://badge.fury.io/js/tty-test-helper.svg)](https://badge.fury.io/js/tty-test-helper)
# tty-test-helper
Helper for testing interactive console applications.

```js
import test from 'ava';
import ttyTestHelper from './index.js';

test('ls', async (t) => {
const app = ttyTestHelper('ls', { args: ['fixtures'], fork: false });

await app.next(); // waits for next stdout
t.true(app.stdout.length === 1);
});

```