test(javascript): cover array holes, nested spreads and an empty spread before an argument in kill signals

Review follow-up: firstRuntimeArgument has separate paths for an array hole, a nested array spread and an empty spread followed by another argument. child.kill(...[, "SIGINT"]) sends SIGTERM, child.kill(...[...["SIGINT"]]) sends SIGINT and child.kill(...[], "SIGKILL") sends SIGKILL; the case now pins all three.
This commit is contained in:
Davmunrey authored and Ysopwnable committed 2026-11-21 20:48:31 +01:00
1 parent 4bcd0d864a
commit 909d4702f2
1 file changed
+6
@@ -212,6 +212,9 @@ describe("JavaScript semantic analysis: child-process signals", () => {
const child = spawn("/bin/tool");
child.kill(...[]);
child.kill(...["SIGINT"]);
child.kill(...[, "SIGINT"]);
child.kill(...[...["SIGINT"]]);
child.kill(...[], "SIGKILL");
child.kill(...signals);
const literals = ["SIGINT"];
child.kill(...literals);
@@ -238,6 +241,9 @@ describe("JavaScript semantic analysis: child-process signals", () => {
).toEqual([
"SIGTERM",
"SIGINT",
"SIGTERM",
"SIGINT",
"SIGKILL",
null,
null,
"SIGTERM",