diff --git a/tests/command.help.test.js b/tests/command.help.test.js index 6046e034c..030cb858b 100644 --- a/tests/command.help.test.js +++ b/tests/command.help.test.js @@ -120,7 +120,9 @@ Commands: const program = new commander.Command(); program.option('-h, --host', 'select host'); const helpInformation = program.helpInformation(); - assert(!/\W-h\W.*display help/.test(helpInformation)); + assert(helpInformation.includes(' -h, --host')); + assert(!helpInformation.includes(' -h, --help')); + assert(helpInformation.includes(' --help')); }); test('when both help flags masked then not displayed in helpInformation', () => {