Skip to content
Myr

command.nested.test.js

This file

Path

tests/command.nested.test.js

12 lines · 340 bytes · JavaScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 0b0fbbe point at it.

Update dependencies (#1524)John Geebefore adoption0b0fbbe

lines 1–12why, one step back
1const commander = require('../');
23test('when call nested subcommand then runs', () => {4 const program = new commander.Command();5 const leafAction = jest.fn();6 program7 .command('sub1')8 .command('sub2')9 .action(leafAction);10 program.parse('node test.js sub1 sub2'.split(' '));11 expect(leafAction).toHaveBeenCalled();12});