test.command.name.js
This file
Path
test/test.command.name.js
12 lines · 337 bytes · JavaScript
Last changed by
Merge pull request #266 from zhiyelee/fixThomas Geraghtybefore adoption4fd6aa6
History of this fileTake it
12345678910111213var program = require('../') , should = require('should');
program .command('mycommand [options]', 'this is my command');
program.parse(['node', 'test']);
program.name.should.be.a.Function;program.name().should.equal('test');program.commands[0].name().should.equal('mycommand');program.commands[1].name().should.equal('help');