Skip to content
Myr

Test for help for arguments without description (#1459)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by John Gee · committed by GitHub · parent 09dfb67 · Browse files · 1 file+11 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−1 removed

  • tests:+11 added−1 removed

1 file+11 added−1 removed

modified:tests/command.help.test.js+11 added-1 removed
249 unmodified lines
250 .arguments('<file>')251 .helpOption(false)252 .description('description', { file: 'input source' });253 const helpInformation = program.helpInformation();254 expect(helpInformation).toMatch(/Arguments:\n +file +input source/); // [sic], extra line254 expect(helpInformation).toMatch(/Arguments:\n +file +input source/);255});256257test('when arguments described and empty description then arguments included in helpInformation', () => {258 const program = new commander.Command();259 program260 .arguments('<file>')261 .helpOption(false)262 .description('', { file: 'input source' });263 const helpInformation = program.helpInformation();264 expect(helpInformation).toMatch(/Arguments:\n +file +input source/);265});