shell.exec -> shell.spawn

This commit is contained in:
Girish Ramakrishnan
2018-11-17 19:26:19 -08:00
parent 1b1945e1f5
commit fd4057df94
6 changed files with 12 additions and 12 deletions

View File

@@ -12,7 +12,7 @@ var expect = require('expect.js'),
describe('shell', function () {
it('can run valid program', function (done) {
var cp = shell.exec('test', 'ls', [ '-l' ], { }, function (error) {
var cp = shell.spawn('test', 'ls', [ '-l' ], { }, function (error) {
expect(cp).to.be.ok();
expect(error).to.be(null);
done();
@@ -20,14 +20,14 @@ describe('shell', function () {
});
it('fails on invalid program', function (done) {
var cp = shell.exec('test', 'randomprogram', [ ], { }, function (error) {
var cp = shell.spawn('test', 'randomprogram', [ ], { }, function (error) {
expect(error).to.be.ok();
done();
});
});
it('fails on failing program', function (done) {
var cp = shell.exec('test', '/usr/bin/false', [ ], { }, function (error) {
var cp = shell.spawn('test', '/usr/bin/false', [ ], { }, function (error) {
expect(error).to.be.ok();
done();
});