Skip to content

Commit

Permalink
Call storeOptionsAsProperties() with appropriate parameter value in test
Browse files Browse the repository at this point in the history
  • Loading branch information
aweebit authored and abetomo committed Aug 19, 2023
1 parent 6871e68 commit 96f076d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/commander.configureCommand.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,14 @@ test('when storeOptionsAsProperties() after adding option then throw', () => {
const program = new commander.Command();
program.option('--port <number>', 'port number', '80');
expect(() => {
program.storeOptionsAsProperties(false);
program.storeOptionsAsProperties();
}).toThrow();
});

test('when storeOptionsAsProperties() after setting option value then throw', () => {
const program = new commander.Command();
program.setOptionValue('foo', 'bar');
expect(() => {
program.storeOptionsAsProperties(false);
program.storeOptionsAsProperties();
}).toThrow();
});

0 comments on commit 96f076d

Please sign in to comment.