Add shell.execSync

This commit is contained in:
Girish Ramakrishnan
2016-05-24 10:19:00 -07:00
parent c1a2444dfa
commit d71d09c1ba
2 changed files with 24 additions and 1 deletions

View File

@@ -47,5 +47,20 @@ describe('shell', function () {
done();
});
});
it('execSync a valid program', function (done) {
shell.execSync('test', 'ls -l | wc -c');
done();
});
it('execSync throws for invalid program', function (done) {
expect(function () { shell.execSync('test', 'cannotexist') }).to.throwException();
done();
});
it('execSync throws for failed program', function (done) {
expect(function () { shell.execSync('test', 'false'); }).to.throwException();
done();
});
});