argument.chain.test.js
This file
Path
tests/argument.chain.test.js
35 lines · 1.1 KiB · 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 { Argument } from '../index.js';2import { test, describe } from 'node:test';3import assert from 'node:assert/strict';Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40
lines 4–8why, one step back45describe('Argument methods that should return this for chaining', () => {6 test('when call .default() then returns this', () => {7 const argument = new Argument('<value>');8 const result = argument.default(3);Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086
line 9why, one step back9 assert.equal(result, argument);Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40
lines 10–13why, one step back10 });1112 test('when call .argParser() then returns this', () => {13 const argument = new Argument('<value>');Reformat code with Prettier (#2180)John Geebefore adoption1bdc749
line 14why, one step back14 const result = argument.argParser(() => {});Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086
line 15why, one step back15 assert.equal(result, argument);Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40
lines 16–20why, one step back16 });1718 test('when call .choices() then returns this', () => {19 const argument = new Argument('<value>');20 const result = argument.choices(['a']);Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086
line 21why, one step back21 assert.equal(result, argument);Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40
lines 22–26why, one step back22 });2324 test('when call .argRequired() then returns this', () => {25 const argument = new Argument('<value>');26 const result = argument.argRequired();Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086
line 27why, one step back27 assert.equal(result, argument);Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40
lines 28–32why, one step back28 });2930 test('when call .argOptional() then returns this', () => {31 const argument = new Argument('<value>');32 const result = argument.argOptional();Switch from Jest to Node.js built-in test runner (#2463)John Geebefore adoption3dd6086
line 33why, one step back33 assert.equal(result, argument);Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40
lines 34–35why, one step back34 });35});