test.command.name.js
This file
Path
test/test.command.name.js
24 lines · 606 bytes · JavaScript
Last changed by
Standardize help output (#853)Jared Petersenbefore adoption713db77
History of this fileTake it
The walk stopped after 200 commits: lines older than 6135fbc point at it.
Merge pull request #342 from demohi/patch-1Zhiye Libefore adoption6135fbc
line 1why, one step back1var program = require('../')Merge pull request #382 from claylo/masterRandall Koutnikbefore adoptionb91f7db
line 2why, one step back2 , sinon = require('sinon').sandbox.create()Merge pull request #342 from demohi/patch-1Zhiye Libefore adoption6135fbc
lines 3–4why, one step back3 , should = require('should');4Merge pull request #382 from claylo/masterRandall Koutnikbefore adoptionb91f7db
lines 5–7why, one step back5sinon.stub(process, 'exit');6sinon.stub(process.stdout, 'write');7Merge pull request #342 from demohi/patch-1Zhiye Libefore adoption6135fbc
lines 8–12why, one step back8program9 .command('mycommand [options]', 'this is my command');1011program.parse(['node', 'test']);12fix testsusmonsterbefore adoptiondcddf69
line 13why, one step back13program.name.should.be.a.Function();Merge pull request #342 from demohi/patch-1Zhiye Libefore adoption6135fbc
lines 14–16why, one step back14program.name().should.equal('test');15program.commands[0].name().should.equal('mycommand');16program.commands[1].name().should.equal('help');Merge pull request #382 from claylo/masterRandall Koutnikbefore adoptionb91f7db
lines 17–20why, one step back1718var output = process.stdout.write.args[0];1920output[0].should.containEql([Standardize help output (#853)Jared Petersenbefore adoption713db77
line 21why, one step back21 ' mycommand [options] this is my command'Merge pull request #382 from claylo/masterRandall Koutnikbefore adoptionb91f7db
lines 22–24why, one step back22].join('\n'));2324sinon.restore();