Skip to content
Myr

Use simple match in test (to avoid warning about expensive regex) (#2485)

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

* Use simple match in test (to avoid warning about expensive regex) * Improve clarity * Remove unnecessary extra option in test

authored by John Gee · committed by GitHub · parent 0ea3bb3 · Browse files · 1 file+3 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+3 added−1 removed

  • tests:+3 added−1 removed

1 file+3 added−1 removed

modified:tests/command.help.test.js+3 added-1 removed
118 unmodified lines
119 test('when help short flag masked then not displayed in helpInformation', () => {120 const program = new commander.Command();121 program.option('-h, --host', 'select host');122 const helpInformation = program.helpInformation();123 assert(!/\W-h\W.*display help/.test(helpInformation));123 assert(helpInformation.includes(' -h, --host'));124 assert(!helpInformation.includes(' -h, --help'));125 assert(helpInformation.includes(' --help'));126 });127128 test('when both help flags masked then not displayed in helpInformation', () => {129 const program = new commander.Command();
190 unmodified lines