tty-test-helper
0.1.1 • Public • Published
tty-test-helper
Helper for testing interactive console applications.
import test from 'ava';
import ttyTestHelper from './index.js';
test('ls', async (t) => {
const app = ttyTestHelper('ls', { args: ['fixtures'], fork: false });
await app.next();
t.true(app.stdout.length === 1);
});
Package Sidebar
Install
Weekly Downloads