Skip to content
Myr

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 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 { 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 back
4
5describe('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 back
9 assert.equal(result, argument);

Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40

lines 10–13why, one step back
10 });
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 back
14 const result = argument.argParser(() => {});

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

line 15why, one step back
15 assert.equal(result, argument);

Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40

lines 16–20why, one step back
16 });
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 back
21 assert.equal(result, argument);

Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40

lines 22–26why, one step back
22 });
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 back
27 assert.equal(result, argument);

Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40

lines 28–32why, one step back
28 });
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 back
33 assert.equal(result, argument);

Add copyInheritedSettings to README (#1798)John Geebefore adoption471ec40

lines 34–35why, one step back
34 });
35});