command.executableSubcommand.test.js
This file
Path
tests/command.executableSubcommand.test.js
19 lines · 578 bytes · JavaScript
Last changed by
Switching to esm-only (#2464)John Geebefore adoptionf4bd470
History of this fileTake it
The walk stopped after 200 commits: lines older than 471ec40 point at it.
Switching to esm-only (#2464)John Geebefore adoptionf4bd470
lines 1–3why, one step back1import { createTestCommand } from './testHelpers.js';2import { test } from 'node:test';3import assert from 'node:assert/strict';Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40
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 copyInheritedSettings to README (#1798)John Geebefore adoption471ec40
line 19why, one step back19});