Browse Source

Get help/stdin test working

pull/2/head
Luke Childs 8 years ago
parent
commit
a8f047608d
  1. 8
      test/unit.js

8
test/unit.js

@ -34,11 +34,15 @@ test('cli input from stdin', t => {
});
});
// If this worked that would be awesome
test.skip('cli should show help if stdin and file input are empty', t => {
test('cli should show help if stdin and file input are empty', t => {
const commands = [];
commands.push(exec('node ../dist/cli.js'));
commands.push(exec('node ../dist/cli.js --help'));
// We ned to manually stop listening on stdin
// This happens automatically when ran from terminal
commands[0].childProcess.stdin.end();
return Promise.all(commands).then((results) => {
t.is(results[0].stdout, results[1].stdout);
});

Loading…
Cancel
Save