Skip to content
Myr

Fix use of floating number for the `timeout` and `forceKillAfterTimeout` options (#431)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kiko Beats · committed by GitHub · parent a827d82 · Browse files · 2 files+4 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
  • Co-authored-by: ehmicky <ehmicky@users.noreply.github.com>

Diff stats

2 files+4 added−4 removed

  • tests:+2 added−2 removed
  • other:+2 added−2 removed

2 files+4 added−4 removed

modified:lib/kill.js+2 added-2 removed
modified:test/kill.js+2 added-2 removed
59 unmodified lines
60 const {signal} = await t.throwsAsync(subprocess);61 t.is(signal, 'SIGKILL');62 });6364 test('`forceKillAfterTimeout` should not be a float', t => {64 test('`forceKillAfterTimeout` should not be NaN', t => {65 t.throws(() => {66 execa('noop').kill('SIGTERM', {forceKillAfterTimeout: 0.5});66 execa('noop').kill('SIGTERM', {forceKillAfterTimeout: NaN});67 }, {instanceOf: TypeError, message: /non-negative integer/});68 });6970 test('`forceKillAfterTimeout` should not be negative', t => {
192 unmodified lines