command.commandHelp.test.js
This file
Path
tests/command.commandHelp.test.js
19 lines · 600 bytes · JavaScript
Last changed by
Refactor help internals into separate interface/class (#1365)John Geebefore adoption19ae912
History of this fileTake it
The walk stopped after 200 commits: lines older than 6405325 point at it.
Prepare for release (#1255)John Geebefore adoption6405325
lines 1–2why, one step back1const commander = require('../');2Refactor help internals into separate interface/class (#1365)John Geebefore adoption19ae912
line 3why, one step back3// This is a ported legacy test.Prepare for release (#1255)John Geebefore adoption6405325
line 4why, one step back4Refactor help internals into separate interface/class (#1365)John Geebefore adoption19ae912
line 5why, one step back5test('when program has command then appears in help', () => {Prepare for release (#1255)John Geebefore adoption6405325
lines 6–8why, one step back6 const program = new commander.Command();7 program8 .command('bare');Refactor help internals into separate interface/class (#1365)John Geebefore adoption19ae912
line 9why, one step back9 const commandHelp = program.helpInformation();Prepare for release (#1255)John Geebefore adoption6405325
lines 10–12why, one step back10 expect(commandHelp).toMatch(/Commands:\n +bare\n/);11});12Refactor help internals into separate interface/class (#1365)John Geebefore adoption19ae912
line 13why, one step back13test('when program has command with optional arg then appears in help', () => {Prepare for release (#1255)John Geebefore adoption6405325
lines 14–16why, one step back14 const program = new commander.Command();15 program16 .command('bare [bare-arg]');Refactor help internals into separate interface/class (#1365)John Geebefore adoption19ae912
line 17why, one step back17 const commandHelp = program.helpInformation();Prepare for release (#1255)John Geebefore adoption6405325
lines 18–19why, one step back18 expect(commandHelp).toMatch(/Commands:\n +bare \[bare-arg\]\n/);19});