test(cli): restore Pi abort-kill assertion dropped alongside #2787 test

The #2787 change added client_adapter_pi_emits_string_enum_issue2787 directly below client_adapter_pi_wraps_result_and_honors_abort and, in the same hunk, removed that test's check that the generated abort handler kills the cli child (if (!child.killed) child.kill();). The generator still emits the line; restore the assertion byte-for-byte so the abort path keeps its coverage.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
Martin Vogel committed 2026-10-27 23:41:04 +01:00
1 parent 86320afa97
commit 74982efc60
1 file changed
+1
+1
View File
@@ -1243,6 +1243,7 @@ TEST(client_adapter_pi_wraps_result_and_honors_abort) {
ASSERT_NOT_NULL(
strstr(js, "[{ type: 'text', text: JSON.stringify(result ?? null, null, 2) }]"));
ASSERT_NOT_NULL(strstr(js, "signal?.addEventListener('abort', onAbort, { once: true })"));
ASSERT_NOT_NULL(strstr(js, "if (!child.killed) child.kill();"));
free(js);
PASS();
}