@@ -138,7 +138,7 @@ test('spawnAndExit detached', spawnAndExit, false, true);
138138test ( 'spawnAndExit cleanup detached' , spawnAndExit , true , true ) ;
139139
140140// When parent process exits before child process
141- const spawnAndKill = async ( t , signal , cleanup , detached , isKilled ) => {
141+ const spawnAndKill = async ( t , [ signal , cleanup , detached , isKilled ] ) => {
142142 const subprocess = execa ( 'sub-process' , [ cleanup , detached ] , { stdio : [ 'ignore' , 'ignore' , 'ignore' , 'ipc' ] } ) ;
143143
144144 const pid = await pEvent ( subprocess , 'message' ) ;
@@ -164,18 +164,18 @@ const spawnAndKill = async (t, signal, cleanup, detached, isKilled) => {
164164// With `options.cleanup`, subprocesses are always killed
165165// - `options.cleanup` with SIGKILL is a noop, since it cannot be handled
166166const exitIfWindows = process . platform === 'win32' ;
167- test ( 'spawnAndKill SIGTERM' , spawnAndKill , 'SIGTERM' , false , false , exitIfWindows ) ;
168- test ( 'spawnAndKill SIGKILL' , spawnAndKill , 'SIGKILL' , false , false , exitIfWindows ) ;
169- test ( 'spawnAndKill cleanup SIGTERM' , spawnAndKill , 'SIGTERM' , true , false , true ) ;
170- test ( 'spawnAndKill cleanup SIGKILL' , spawnAndKill , 'SIGKILL' , true , false , exitIfWindows ) ;
171- test ( 'spawnAndKill detached SIGTERM' , spawnAndKill , 'SIGTERM' , false , true , false ) ;
172- test ( 'spawnAndKill detached SIGKILL' , spawnAndKill , 'SIGKILL' , false , true , false ) ;
173- test ( 'spawnAndKill cleanup detached SIGTERM' , spawnAndKill , 'SIGTERM' , true , true , false ) ;
174- test ( 'spawnAndKill cleanup detached SIGKILL' , spawnAndKill , 'SIGKILL' , true , true , false ) ;
167+ test ( 'spawnAndKill SIGTERM' , spawnAndKill , [ 'SIGTERM' , false , false , exitIfWindows ] ) ;
168+ test ( 'spawnAndKill SIGKILL' , spawnAndKill , [ 'SIGKILL' , false , false , exitIfWindows ] ) ;
169+ test ( 'spawnAndKill cleanup SIGTERM' , spawnAndKill , [ 'SIGTERM' , true , false , true ] ) ;
170+ test ( 'spawnAndKill cleanup SIGKILL' , spawnAndKill , [ 'SIGKILL' , true , false , exitIfWindows ] ) ;
171+ test ( 'spawnAndKill detached SIGTERM' , spawnAndKill , [ 'SIGTERM' , false , true , false ] ) ;
172+ test ( 'spawnAndKill detached SIGKILL' , spawnAndKill , [ 'SIGKILL' , false , true , false ] ) ;
173+ test ( 'spawnAndKill cleanup detached SIGTERM' , spawnAndKill , [ 'SIGTERM' , true , true , false ] ) ;
174+ test ( 'spawnAndKill cleanup detached SIGKILL' , spawnAndKill , [ 'SIGKILL' , true , true , false ] ) ;
175175
176176// See #128
177177test ( 'removes exit handler on exit' , async t => {
178- // FIXME: This relies on `signal-exit` internals
178+ // @todo this relies on `signal-exit` internals
179179 const emitter = process . __signal_exit_emitter__ ;
180180
181181 const subprocess = execa ( 'noop' ) ;
0 commit comments