Comparing version 0.2.6 to 0.2.8
@@ -171,2 +171,6 @@ var child_process = require('child_process'), | ||
if (typeof options.safe === 'undefined') { | ||
options.safe = true; | ||
} | ||
if (!callback) { | ||
@@ -173,0 +177,0 @@ callback = function() {}; |
{ | ||
"name": "executive", | ||
"version": "0.2.6", | ||
"version": "0.2.8", | ||
"description": "exec for the lazy", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,4 +6,4 @@ exec = require('../'); | ||
it('should buffer all stdout', function(done) { | ||
exec.bufferedExec('ls', [], {}, function(err, out, code) { | ||
out.should.not.eq('') | ||
exec.bufferedExec('zsh', ['-c', 'echo 1'], {}, function(err, out, code) { | ||
out.should.eq('1\n') | ||
done() | ||
@@ -14,5 +14,40 @@ }) | ||
it('should buffer all stderr', function(done) { | ||
done() | ||
exec.bufferedExec('zsh', ['-c', 'doesnotexist'], {}, function(err, out, code) { | ||
err.should.contain('command not found') | ||
done() | ||
}) | ||
}) | ||
}) | ||
describe('quietExec', function() { | ||
it('should buffer all stdout', function(done) { | ||
exec.quietExec('zsh', ['-c', 'echo 1'], {}, function(err, out, code) { | ||
out.should.eq('1\n') | ||
done() | ||
}) | ||
}) | ||
it('should buffer all stderr', function(done) { | ||
exec.quietExec('zsh', ['-c', 'doesnotexist'], {}, function(err, out, code) { | ||
err.should.contain('command not found') | ||
done() | ||
}) | ||
}) | ||
}) | ||
describe('interactiveExec', function() { | ||
it('should not buffer stdout', function(done) { | ||
exec.interactiveExec('zsh', ['-c', 'echo 1'], {}, function(err, out, code) { | ||
(out == null).should.be.true | ||
done() | ||
}) | ||
}) | ||
it('should not buffer stderr', function(done) { | ||
exec.interactiveExec('zsh', ['-c', 'doesnotexist'], {}, function(err, out, code) { | ||
(err == null).should.be.true | ||
done() | ||
}) | ||
}) | ||
}) | ||
}) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10824
235