From e7542150ed3823e7c7ab21cfeb7f772be724f507 Mon Sep 17 00:00:00 2001 From: ehmicky Date: Tue, 11 Jun 2019 10:00:00 +0200 Subject: [PATCH] Improve tests --- test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test.js b/test.js index 917337c445..7918cd4ae9 100644 --- a/test.js +++ b/test.js @@ -179,11 +179,13 @@ if (process.platform !== 'win32') { test('.kill() `forceKillAfter` should not be a float', t => { t.throws(() => { execa('noop').kill('SIGTERM', {forceKillAfter: 0.5}); - }, TypeError); + }, {instanceOf: TypeError, message: /non-negative integer/}); }); test('.kill() `forceKillAfter` should not be negative', t => { - t.throws(() => execa('noop').kill('SIGTERM', {forceKillAfter: -1}), TypeError); + t.throws(() => { + execa('noop').kill('SIGTERM', {forceKillAfter: -1}); + }, {instanceOf: TypeError, message: /non-negative integer/}); }); }