UNPKG

apologenator

Version:
25 lines (18 loc) 454 B
import childProcess from 'child_process'; import test from 'ava'; test.cb('main', t => { const cp = childProcess.spawn('./cli.js', ['-g'], {stdio: 'inherit'}); cp.on('error', t.ifError); cp.on('close', code => { t.is(code, 0); t.end(); }); }); test.cb('save', t => { const cp = childProcess.spawn('./cli.js', ['-g', '--save'], {stdio: 'inherit'}); cp.on('error', t.ifError); cp.on('close', code => { t.is(code, 0); t.end(); }); });