Skip to content
Myr

program.test.js

This file

Path

tests/program.test.js

20 lines · 637 bytes · JavaScript

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 7b6567e point at it.

Fix syntactically incorrect command name (#1488)John Geebefore adoption7b6567e

lines 1–20why, one step back
1const commander = require('../');
23// Do some testing of the default export(s).45test('when require commander then is a Command (default export of global)', () => {6 // Deprecated global command7 const program = commander;8 expect(program.constructor.name).toBe('Command');9});1011test('when require commander then has program (named export of global)', () => {12 // program added in v513 const program = commander.program;14 expect(program.constructor.name).toBe('Command');15});1617test('when require commander then has newable Command', () => {18 const cmd = new commander.Command();19 expect(cmd.constructor.name).toBe('Command');20});