Last active
December 19, 2015 05:28
-
-
Save ben-ng/5903919 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var assert = require('assert') | |
, cmd = require('../../lib/cmd') | |
, Cmd = cmd.Cmd | |
, tests; | |
tests = { | |
'Cmd parseArgs gen app defaults': function () { | |
console.log("FOO"); | |
var c = new Cmd(['app', 'foo'], {}); | |
assert.equal('gen:app[foo,default,default]', c.jakeTaskName); | |
console.log("BAZ"); | |
} | |
, 'Cmd parseArgs gen app --jade': function () { | |
var c = new Cmd(['app', 'foo', '--jade']); | |
assert.equal('gen:app[foo,jade,default]', c.jakeTaskName); | |
} | |
, 'Cmd parseArgs gen scaffold zooby foo bar --realtime': function () { | |
var c = new Cmd(['scaffold', 'zooby', 'foo:int', 'bar:string', | |
'--realtime']); | |
assert.equal('gen:scaffold[zooby,foo:int%bar:string,default,realtime]', | |
c.jakeTaskName); | |
} | |
}; | |
module.exports = tests; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MILK:geddy ben$ jake test | |
*** Running test/cli/cmd.js *** | |
Cmd parseArgs gen app defaults | |
FOO | |
BAZ | |
MILK:geddy ben$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment