test.command.action.js
This file
Path
test/test.command.action.js
14 lines · 309 bytes · JavaScript
Last changed by
Merge pull request #313 from zhiyelee/codestyleZhiye Libefore adoption543e47f
History of this fileTake it
123456789101112131415var program = require('../') , should = require('should');
var val = false;program .command('info [options]') .option('-C, --no-color', 'turn off color output') .action(function () { val = this.color; });
program.parse(['node', 'test', 'info']);
program.commands[0].color.should.equal(val);