famous-examples-generator
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name": "famous-examples-generator", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Generate Templates for Famous Examples", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -28,3 +28,3 @@ /* This Source Code Form is subject to the terms of the Mozilla Public | ||
test('test-bin:', function (t) { | ||
test('test-bin: two args', function (t) { | ||
t.plan(3); | ||
@@ -46,3 +46,19 @@ | ||
test('test-bin: one arg', function (t) { | ||
t.plan(3); | ||
var binPath = path.resolve(__dirname, '../bin/cmd.js'); | ||
var ps = spawn(binPath, ['-i', examplesPath]); | ||
var stdout = ''; | ||
var stderr = ''; | ||
ps.stdout.on('data', function (buf) { stdout += buf; }); | ||
ps.stderr.on('data', function (buf) { stderr += buf; }); | ||
ps.on('exit', function (code) { | ||
t.equal(code, 0); | ||
t.equal(stderr, ''); | ||
t.equal(stdout, 'All Done!\n'); | ||
}); | ||
}); | ||
test('test-bin: teardown', function (t) { | ||
@@ -49,0 +65,0 @@ t.plan(2); |
38796
31
657