Skip to content
Myr

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 file

Take it

The walk stopped after 200 commits: lines older than fc543c8 point at it.

Merge pull request #295 from zhiyelee/git-style-readmeZhiye Libefore adoptionfc543c8

line 1why, one step back
1var program = require('../')

Merge pull request #382 from claylo/masterRandall Koutnikbefore adoptionb91f7db

line 2why, one step back
2 , sinon = require('sinon').sandbox.create()

Merge pull request #295 from zhiyelee/git-style-readmeZhiye Libefore adoptionfc543c8

lines 3–4why, one step back
3 , should = require('should');
4

Merge pull request #382 from claylo/masterRandall Koutnikbefore adoptionb91f7db

lines 5–7why, one step back
5sinon.stub(process, 'exit');
6sinon.stub(process.stdout, 'write');7

Merge pull request #295 from zhiyelee/git-style-readmeZhiye Libefore adoptionfc543c8

lines 8–12why, one step back
8program
9 .command('mycommand [options]', 'this is my command');1011program.parse(['node', 'test']);12

fix testsusmonsterbefore adoptiondcddf69

line 13why, one step back
13program.name.should.be.a.Function();

Merge pull request #295 from zhiyelee/git-style-readmeZhiye Libefore adoptionfc543c8

lines 14–16why, one step back
14program.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 back
17
18var output = process.stdout.write.args[0];1920output[0].should.containEql([

Standardize help output (#853)Jared Petersenbefore adoption713db77

line 21why, one step back
21 ' mycommand [options] this is my command'

Merge pull request #382 from claylo/masterRandall Koutnikbefore adoptionb91f7db

lines 22–24why, one step back
22].join('\n'));
2324sinon.restore();