command.createHelp.test.js
This file
Path
tests/command.createHelp.test.js
22 lines · 622 bytes · JavaScript
Last changed by
Add describe wrappers so test output makes sense without filenames (#2472)John Geebefore adoptionb3e6795
History of this fileTake it
The walk stopped after 200 commits: lines older than 3103c6b point at it.
Add more tests for implies (#1730)John Geebefore adoption3103c6b
line 1why, one step back1const commander = require('../');Add describe wrappers so test output makes sense without filenames (#2472)John Geebefore adoptionb3e6795
line 2why, one step back2const { test, describe } = require('node:test');Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086
line 3why, one step back3const assert = require('node:assert/strict');Add more tests for implies (#1730)John Geebefore adoption3103c6b
line 4why, one step back4Add describe wrappers so test output makes sense without filenames (#2472)John Geebefore adoptionb3e6795
lines 5–10why, one step back5describe('Command.createHelp() override in subclass', () => {6 test('when override createCommand then affects help', () => {7 class MyHelp extends commander.Help {8 formatHelp(cmd, helper) {9 return 'custom';10 }Add more tests for implies (#1730)John Geebefore adoption3103c6b
lines 11–12why, one step back11 }12Add describe wrappers so test output makes sense without filenames (#2472)John Geebefore adoptionb3e6795
lines 13–16why, one step back13 class MyCommand extends commander.Command {14 createHelp() {15 return Object.assign(new MyHelp(), this.configureHelp());16 }Add more tests for implies (#1730)John Geebefore adoption3103c6b
lines 17–18why, one step back17 }18Add describe wrappers so test output makes sense without filenames (#2472)John Geebefore adoptionb3e6795
lines 19–21why, one step back19 const program = new MyCommand();20 assert.equal(program.helpInformation(), 'custom');21 });Add more tests for implies (#1730)John Geebefore adoption3103c6b
line 22why, one step back22});