convert more execSync to async
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const expect = require('expect.js'),
|
||||
const BoxError = require('../boxerror.js'),
|
||||
expect = require('expect.js'),
|
||||
path = require('path'),
|
||||
safe = require('safetydance'),
|
||||
shell = require('../shell.js');
|
||||
@@ -78,6 +79,6 @@ describe('shell', function () {
|
||||
|
||||
it('exec times out properly', async function () {
|
||||
const [error] = await safe(shell.promises.exec('sleeping', 'sleep 20', { timeout: 1000 }));
|
||||
expect(error.signal).to.be('SIGTERM'); // somtimes code is ETIMEOUT
|
||||
expect(error.reason).to.be(BoxError.SHELL_ERROR);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user