program.test.js
This file
Path
tests/program.test.js
20 lines · 637 bytes · JavaScript
Last changed by
Enhance Option class to allow hiding help, specifying choices, and change how default value displayed in help (#1331)John Geebefore adoptiona05a8bc
History of this fileTake it
The walk stopped after 200 commits: lines older than 28e8d3f point at it.
Add support for multiple aliases (#1236)John Geebefore adoption28e8d3f
lines 1–5why, one step back1const commander = require('../');23// Do some testing of the default export(s).45test('when require commander then is a Command (default export of global)', () => {Enhance Option class to allow hiding help, specifying choices, and change how default value displayed in help (#1331)John Geebefore adoptiona05a8bc
line 6why, one step back6 // Deprecated global commandAdd support for multiple aliases (#1236)John Geebefore adoption28e8d3f
lines 7–20why, one step back7 const program = commander;8 expect(program.constructor.name).toBe('Command');9});1011test('when require commander then has program (named export of global)', () => {12 // program added in v513 const program = commander.program;14 expect(program.constructor.name).toBe('Command');15});1617test('when require commander then has newable Command', () => {18 const cmd = new commander.Command();19 expect(cmd.constructor.name).toBe('Command');20});