convert more execSync to async

This commit is contained in:
Girish Ramakrishnan
2024-02-20 23:09:49 +01:00
parent b51071155a
commit 9b94cf18d0
15 changed files with 71 additions and 72 deletions

View File

@@ -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);
});
});