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
Support setting name in #name function and make it chainableCedric Reichenbachbefore adoption57bc3ba
lines 1–9why, one step back1var program = require('../')2 , sinon = require('sinon').sandbox.create()3 , should = require('should');45sinon.stub(process, 'exit');6sinon.stub(process.stdout, 'write');78program.name('foobar').description('This is a test.');9fix testsusmonsterbefore adoptiondcddf69
line 10why, one step back10program.name.should.be.a.Function();Support setting name in #name function and make it chainableCedric Reichenbachbefore adoption57bc3ba
lines 11–16why, one step back11program.name().should.equal('foobar');12program.description().should.equal('This is a test.');1314var output = process.stdout.write.args[0];1516sinon.restore();