@@ -3,32 +3,32 @@ import fs from 'node:fs';
33import path from 'node:path' ;
44import { fileURLToPath } from 'node:url' ;
55
6+ import ciInfo from 'ci-info' ;
67import stripAnsi from 'strip-ansi' ;
78import { test } from 'tap' ;
89
910import { execCli } from '../helper/cli.js' ;
1011
1112const __dirname = fileURLToPath ( new URL ( '.' , import . meta. url ) ) ;
1213
13- test ( 'timeout' , t => {
14+ test ( 'timeout' , { skip : ciInfo . isCI } , t => {
1415 execCli ( [ 'long-running.cjs' , '-T' , '1s' ] , ( error , stdout ) => {
1516 t . ok ( error ) ;
1617 t . match ( stdout , / T i m e d o u t / ) ;
1718 t . end ( ) ;
1819 } ) ;
1920} ) ;
2021
21- // FIXME: This test fails in CI, but not locally. Re-enable at some point…
22- // test('interrupt', t => {
23- // const proc = execCli(['long-running.cjs'], (_, stdout) => {
24- // t.match(stdout, /SIGINT/);
25- // t.end();
26- // });
27- //
28- // setTimeout(() => {
29- // proc.kill('SIGINT');
30- // }, 2000);
31- // });
22+ test ( 'interrupt' , { skip : ciInfo . isCI } , t => {
23+ const proc = execCli ( [ 'long-running.cjs' ] , ( _ , stdout ) => {
24+ t . match ( stdout , / S I G I N T / ) ;
25+ t . end ( ) ;
26+ } ) ;
27+
28+ setTimeout ( ( ) => {
29+ proc . kill ( 'SIGINT' ) ;
30+ } , 2000 ) ;
31+ } ) ;
3232
3333test ( 'include anonymous functions in error reports' , t => {
3434 execCli ( 'error-in-anonymous-function.cjs' , ( error , stdout ) => {
0 commit comments