()
| 123 | |
| 124 | describe('option with non-boolean default and preset', () => { |
| 125 | function createPepperProgramWithDefaultAndPreset() { |
| 126 | const program = new commander.Command(); |
| 127 | program |
| 128 | .addOption( |
| 129 | new commander.Option('-p, --pepper') |
| 130 | .default('default') |
| 131 | .preset('preset'), |
| 132 | ) |
| 133 | .option('-P, --no-pepper', 'remove pepper'); |
| 134 | return program; |
| 135 | } |
| 136 | |
| 137 | test('when option not specified then value is default', () => { |
| 138 | const program = createPepperProgramWithDefaultAndPreset(); |
no test coverage detected