summaryrefslogtreecommitdiff
path: root/cli/tests
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2024-02-05 14:28:28 +0900
committerGitHub <noreply@github.com>2024-02-05 14:28:28 +0900
commit961fa27c769452a5ef233994886f5a9be9690773 (patch)
tree3441284cc27d6af4ba5934d1744c610b90b955de /cli/tests
parent56f58a047e3c1cc27ff55988f25173cc18ef6aeb (diff)
fix(ext/node): fix timeout param validation in cp.execFile (#22262)
Diffstat (limited to 'cli/tests')
-rw-r--r--cli/tests/unit_node/child_process_test.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/cli/tests/unit_node/child_process_test.ts b/cli/tests/unit_node/child_process_test.ts
index b3986a1aa..066e45f72 100644
--- a/cli/tests/unit_node/child_process_test.ts
+++ b/cli/tests/unit_node/child_process_test.ts
@@ -754,3 +754,20 @@ Deno.test(async function forkIpcKillDoesNotHang() {
await p.promise;
});
+
+Deno.test(async function execFileWithUndefinedTimeout() {
+ const { promise, resolve, reject } = Promise.withResolvers<void>();
+ CP.execFile(
+ "git",
+ ["-v"],
+ { timeout: undefined, encoding: "utf8" },
+ (err) => {
+ if (err) {
+ reject(err);
+ return;
+ }
+ resolve();
+ },
+ );
+ await promise;
+});