17
17
/* eslint no-undef: 0 */
18
18
const {
19
19
FuzzTestBuilder,
20
+ describeSkipOnPlatform,
20
21
// eslint-disable-next-line @typescript-eslint/no-var-requires
21
22
} = require ( "../helpers.js" ) ;
22
23
// eslint-disable-next-line @typescript-eslint/no-var-requires
23
24
const path = require ( "path" ) ;
24
25
26
+ // Signal handling in Node.js on Windows is only rudimentary supported.
27
+ // Specifically using `process.kill`, like the test does to interrupt itself,
28
+ // will unconditionally terminate the process. The signal processing works in
29
+ // manual tests, though.
30
+ const describe = describeSkipOnPlatform ( "win32" ) ;
31
+
25
32
describe ( "SIGINT handlers" , ( ) => {
26
33
let fuzzTestBuilder ;
27
34
@@ -35,13 +42,6 @@ describe("SIGINT handlers", () => {
35
42
36
43
describe ( "in standalone fuzzing mode" , ( ) => {
37
44
it ( "stop sync fuzzing on SIGINT" , ( ) => {
38
- // TODO: make the SIGINT handling produce coverage reports on Windows on exit too.
39
- if ( process . platform === "win32" ) {
40
- console . log (
41
- "// TODO: make the SIGINT handling produce coverage reports on Windows on exit too." ,
42
- ) ;
43
- return ;
44
- }
45
45
const fuzzTest = fuzzTestBuilder
46
46
. sync ( true )
47
47
. fuzzEntryPoint ( "SIGINT_SYNC" )
@@ -50,13 +50,6 @@ describe("SIGINT handlers", () => {
50
50
assertSigintMessagesLogged ( fuzzTest ) ;
51
51
} ) ;
52
52
it ( "stop async fuzzing on SIGINT" , ( ) => {
53
- // TODO: make the SIGINT handling produce coverage reports on Windows on exit too.
54
- if ( process . platform === "win32" ) {
55
- console . log (
56
- "// TODO: make the SIGINT handling produce coverage reports on Windows on exit too." ,
57
- ) ;
58
- return ;
59
- }
60
53
const fuzzTest = fuzzTestBuilder
61
54
. sync ( false )
62
55
. fuzzEntryPoint ( "SIGINT_ASYNC" )
@@ -68,13 +61,6 @@ describe("SIGINT handlers", () => {
68
61
69
62
describe ( "in Jest fuzzing mode" , ( ) => {
70
63
it ( "stop sync fuzzing on SIGINT" , ( ) => {
71
- // TODO: make the SIGINT handling produce coverage reports on Windows on exit too.
72
- if ( process . platform === "win32" ) {
73
- console . log (
74
- "// TODO: make the SIGINT handling produce coverage reports on Windows on exit too." ,
75
- ) ;
76
- return ;
77
- }
78
64
const fuzzTest = fuzzTestBuilder
79
65
. jestTestFile ( "tests.fuzz.js" )
80
66
. jestTestName ( "^Jest Sync$" )
@@ -84,13 +70,6 @@ describe("SIGINT handlers", () => {
84
70
assertSigintMessagesLogged ( fuzzTest ) ;
85
71
} ) ;
86
72
it ( "stop async fuzzing on SIGINT" , ( ) => {
87
- // TODO: make the SIGINT handling produce coverage reports on Windows on exit too.
88
- if ( process . platform === "win32" ) {
89
- console . log (
90
- "// TODO: make the SIGINT handling produce coverage reports on Windows on exit too." ,
91
- ) ;
92
- return ;
93
- }
94
73
const fuzzTest = fuzzTestBuilder
95
74
. jestTestFile ( "tests.fuzz.js" )
96
75
. jestTestName ( "^Jest Async$" )
0 commit comments