Skip to content
Myr

test.command.helpInformation.js

This file

Path

test/test.command.helpInformation.js

21 lines · 487 bytes · JavaScript

Last changed by

removed newline after options and commands headersJared Petersenbefore adoption2c20e91

History of this file

Take it

fixed newline output after help information (#833)Jared Petersenbefore adoption6ddb8eb

lines 1–9why, one step back
1var program = require('../')
2 , sinon = require('sinon').sandbox.create()3 , should = require('should');456program.command('somecommand');7program.command('anothercommand [options]');89var expectedHelpInformation = [

Standardize help output (#853)Jared Petersenbefore adoption713db77

line 10why, one step back
10 'Usage: [options] [command]',

fixed newline output after help information (#833)Jared Petersenbefore adoption6ddb8eb

line 11why, one step back
11 '',

Standardize help output (#853)Jared Petersenbefore adoption713db77

lines 12–13why, one step back
12 'Options:',
13 ' -h, --help output usage information',

fixed newline output after help information (#833)Jared Petersenbefore adoption6ddb8eb

line 14why, one step back
14 '',

Standardize help output (#853)Jared Petersenbefore adoption713db77

lines 15–18why, one step back
15 'Commands:',
16 ' somecommand',17 ' anothercommand [options]',18 ''

fixed newline output after help information (#833)Jared Petersenbefore adoption6ddb8eb

lines 19–21why, one step back
19].join('\n');
2021program.helpInformation().should.equal(expectedHelpInformation);