test.command.name.set.js
This file
Path
test/test.command.name.set.js
16 lines · 424 bytes · JavaScript
Last changed by
fix testsusmonsterbefore adoptiondcddf69
History of this fileTake it
1234567891011121314151617var program = require('../') , sinon = require('sinon').sandbox.create() , should = require('should');
sinon.stub(process, 'exit');sinon.stub(process.stdout, 'write');
program.name('foobar').description('This is a test.');
program.name.should.be.a.Function();program.name().should.equal('foobar');program.description().should.equal('This is a test.');
var output = process.stdout.write.args[0];
sinon.restore();