File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,21 @@ process.env.NODE_NO_WARNINGS = 1;
1010
1111process . env . KIT = process . env . KIT || path . resolve ( os . homedir ( ) , '.kit' ) ;
1212
13+ // Global per-test diagnostics: BEGIN/END + watchdog
14+ ava . beforeEach ( ( t ) => {
15+ t . context . __start = Date . now ( )
16+ t . log ( `[test-diag] BEGIN ${ t . title } ` )
17+ t . context . __timer = setTimeout ( ( ) => {
18+ console . log ( `[test-diag] WARN still running after 15s: ${ t . title } ` )
19+ } , 15000 )
20+ } )
21+
22+ ava . afterEach . always ( ( t ) => {
23+ try { clearTimeout ( t . context . __timer ) } catch { }
24+ const dur = Date . now ( ) - ( t . context . __start || Date . now ( ) )
25+ t . log ( `[test-diag] END ${ t . title } in ${ dur } ms` )
26+ } )
27+
1328ava . serial ( 'app-prompt.js' , async ( t ) => {
1429 let script = 'mock-script-with-arg' ;
1530 let scriptPath = kenvPath ( 'scripts' , `${ script } .js` ) ;
You can’t perform that action at this time.
0 commit comments