@@ -3,32 +3,32 @@ import fs from 'node:fs';
3
3
import path from 'node:path' ;
4
4
import { fileURLToPath } from 'node:url' ;
5
5
6
+ import ciInfo from 'ci-info' ;
6
7
import stripAnsi from 'strip-ansi' ;
7
8
import { test } from 'tap' ;
8
9
9
10
import { execCli } from '../helper/cli.js' ;
10
11
11
12
const __dirname = fileURLToPath ( new URL ( '.' , import . meta. url ) ) ;
12
13
13
- test ( 'timeout' , t => {
14
+ test ( 'timeout' , { skip : ciInfo . isCI } , t => {
14
15
execCli ( [ 'long-running.cjs' , '-T' , '1s' ] , ( error , stdout ) => {
15
16
t . ok ( error ) ;
16
17
t . match ( stdout , / T i m e d o u t / ) ;
17
18
t . end ( ) ;
18
19
} ) ;
19
20
} ) ;
20
21
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
+ } ) ;
32
32
33
33
test ( 'include anonymous functions in error reports' , t => {
34
34
execCli ( 'error-in-anonymous-function.cjs' , ( error , stdout ) => {
0 commit comments