Skip to content

Commit

Permalink
Get help/stdin test working
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed Feb 17, 2017
1 parent 0d242bc commit a8f0476
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit a8f0476

Please sign in to comment.