Skip to content
Myr

Upgrade `signal-exit` to v4 (#570)

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

authored by ehmicky · committed by GitHub · parent 65992b4 · Browse files · 3 files+5 added−5 removed
This commit

State

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

Diff stats

3 files+5 added−5 removed

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

3 files+5 added−5 removed

modified:lib/kill.js+1 added-1 removed
modified:test/kill.js+3 added-3 removed
175 unmodified lines
176177// See #128178test('removes exit handler on exit', async t => {179 // @todo this relies on `signal-exit` internals180 const emitter = process.__signal_exit_emitter__;180 const emitter = globalThis[Symbol.for('signal-exit emitter')];181182 const subprocess = execa('noop.js');183 const listener = emitter.listeners('exit').pop();183 const listener = emitter.listeners.exit.at(-1);184185 await new Promise((resolve, reject) => {186 subprocess.on('error', reject);187 subprocess.on('exit', resolve);188 });189190 const included = emitter.listeners('exit').includes(listener);190 const included = emitter.listeners.exit.includes(listener);191 t.false(included);192});193194test('cancel method kills the subprocess', t => {
116 unmodified lines
modified:package.json+1 added-1 removed