File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,16 @@ ava.serial('app-prompt.js', async (t) => {
5858 }
5959 } ) ;
6060
61+ mockApp . on ( 'exit' , ( code , signal ) => {
62+ console . log ( '[app-diag] child exit' , { code, signal } )
63+ } )
64+ mockApp . on ( 'close' , ( code , signal ) => {
65+ console . log ( '[app-diag] child close' , { code, signal } )
66+ } )
67+ mockApp . on ( 'error' , ( err ) => {
68+ console . log ( '[app-diag] child error' , { message : err ?. message } )
69+ } )
70+
6171 mockApp . on ( 'spawn' , ( ) => {
6272 mockApp . send (
6373 {
@@ -71,6 +81,8 @@ ava.serial('app-prompt.js', async (t) => {
7181
7282 t . log ( { result, command } ) ;
7383 t . is ( result . value . command , command ) ;
84+ // Be explicit: close the child if still running
85+ try { mockApp . kill ( ) } catch { }
7486} ) ;
7587
7688ava . serial ( 'kit setup' , async ( t ) => {
You can’t perform that action at this time.
0 commit comments