command.executableSubcommand.test.js
This file
Path
tests/command.executableSubcommand.test.js
19 lines · 590 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 cc2db5b point at it.
Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086
lines 1–3why, one step back1const { createTestCommand } = require('./testHelpers');2const { test } = require('node:test');3const assert = require('node:assert/strict');Add optional summary for short form of subcommand description. (#1726)John Geebefore adoptioncc2db5b
lines 4–7why, one step back45// Executable subcommand tests that didn't fit in elsewhere.67// This is the default behaviour when no default command and no action handlersAdd describe wrappers so test output makes sense without filenames (#2472)John Geebefore adoptionb3e6795
line 8why, one step back8test('when no command specified and executable subcommand then display help', (t) => {Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086
lines 9–18why, one step back9 const program = createTestCommand();10 program.command('install', 'install description');11 assert.throws(12 () => {13 program.parse(['node', 'test']);14 },15 {16 code: 'commander.help',17 },18 );Add optional summary for short form of subcommand description. (#1726)John Geebefore adoptioncc2db5b
line 19why, one step back19});