Skip to content

Commit

Permalink
Do not test code anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed May 14, 2019
1 parent 9fc33f6 commit 04d5ba0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test.js
Expand Up @@ -364,14 +364,14 @@ test('result.signal is undefined if process failed, but was not killed', async t
t.is(signal, undefined);
});

async function code(t, num) {
async function testExitCode(t, num) {
const {exitCode} = await t.throwsAsync(execa('exit', [`${num}`]), {code: num, message: getExitRegExp(num)});
t.is(exitCode, num);
}

test('error.code is 2', code, 2);
test('error.code is 3', code, 3);
test('error.code is 4', code, 4);
test('error.exitCode is 2', testExitCode, 2);
test('error.exitCode is 3', testExitCode, 3);
test('error.exitCode is 4', testExitCode, 4);

test('timeout kills the process if it times out', async t => {
const {killed, timedOut} = await t.throwsAsync(execa('forever', {timeout: 1, message: TIMEOUT_REGEXP}));
Expand Down

0 comments on commit 04d5ba0

Please sign in to comment.