Skip to content

Commit 134ddad

Browse files
escalate the signal if a vitest-pool-workers test fails because it is killed
1 parent f80a517 commit 134ddad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/vitest-pool-workers/test/helpers.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ function wrap(proc: childProcess.ChildProcess): Process {
7373
return stripAnsi(stderr);
7474
},
7575
get exitCode() {
76-
return closePromise.then(([exitCode]) => exitCode ?? -1);
76+
return closePromise.then(
77+
([exitCode, signal]) => exitCode ?? signal ?? -1
78+
);
7779
},
7880
};
7981
}

0 commit comments

Comments
 (0)