Skip to content
Myr

Add test for addTextHelp returning void (#1351)

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 d26a26d · Browse files · 1 file+7 added−0 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+7 added−0 removed

  • tests:+7 added−0 removed

1 file+7 added−0 removed

modified:tests/command.addHelp.test.js+7 added
31 unmodified lines
32 expect(writeSpy).toHaveBeenNthCalledWith(1, 'text\n');33 expect(writeSpy).toHaveBeenNthCalledWith(2, program.helpInformation());34 });3536 test('when "before" function returns void then no effect', () => {37 const program = new commander.Command();38 program.addHelpText('before', () => { });39 program.outputHelp();40 expect(writeSpy).toHaveBeenNthCalledWith(1, program.helpInformation());41 });4243 test('when "beforeAll" string then string before built-in help', () => {44 const program = new commander.Command();45 program.addHelpText('beforeAll', 'text');46 program.outputHelp();
192 unmodified lines