Skip to content
Myr

options.bool.small.combined.test.js

This file

Path

tests/options.bool.small.combined.test.js

15 lines · 485 bytes · JavaScript

Last changed by

Switching to esm-only (#2464)John Geebefore adoptionf4bd470

History of this file

Take 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 back
1import * as commander from '../index.js';
2import { test } from 'node:test';3import assert from 'node:assert/strict';

Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40

line 4why, one step back
4

Add describe wrappers so test output makes sense without filenames (#2472)John Geebefore adoptionb3e6795

line 5why, one step back
5test('when when multiple short flags specified then parsed as short option group', () => {

Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40

lines 6–12why, one step back
6 const program = new commander.Command();
7 program8 .option('-p, --pepper', 'add pepper')9 .option('-c, --cheese', 'add cheese');1011 program.parse(['node', 'test', '-pc']);12

Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086

lines 13–14why, one step back
13 assert.equal(program.opts().pepper, true);
14 assert.equal(program.opts().cheese, true);

Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40

line 15why, one step back
15});