Skip to content
Myr

command.commandHelp.test.js

This file

Path

tests/command.commandHelp.test.js

19 lines · 600 bytes · JavaScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 0b0fbbe point at it.

Update dependencies (#1524)John Geebefore adoption0b0fbbe

lines 1–19why, one step back
1const commander = require('../');
23// This is a ported legacy test.45test('when program has command then appears in help', () => {6 const program = new commander.Command();7 program8 .command('bare');9 const commandHelp = program.helpInformation();10 expect(commandHelp).toMatch(/Commands:\n +bare\n/);11});1213test('when program has command with optional arg then appears in help', () => {14 const program = new commander.Command();15 program16 .command('bare [bare-arg]');17 const commandHelp = program.helpInformation();18 expect(commandHelp).toMatch(/Commands:\n +bare \[bare-arg\]\n/);19});