Skip to content

Commit

Permalink
Test rejecting invalid commands
Browse files Browse the repository at this point in the history
  • Loading branch information
perrin4869 committed Dec 1, 2021
1 parent a69bde1 commit d389307
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/postgrator-cli-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ function buildTestsForOptions(options) {
expect(log).to.match(/Version: /, 'No version was displayed');
});

tests.push(() => {
console.log('\n----- testing an invalid command-----');

return expect(run(['invalid-command', '--config', 'test/sample-config.json']))
.to.be.rejectedWith(Error, 'Invalid command.');
});

tests.push(async () => {
console.log('\n----- testing migration to 003 -----');
return expect(run(getArgList(options)))
Expand Down

0 comments on commit d389307

Please sign in to comment.