From c97a97240bb60d00f7a28ef327f444a9b6820f37 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 20 Nov 2023 05:27:18 -0800 Subject: fix(ext/node): handle closing process.stdin more than once (#21267) Fixes https://github.com/denoland/deno/issues/21112 Aligns more towards what Node.js does. Closing stdin more than once is a nop. --- cli/tests/unit_node/process_test.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cli/tests/unit_node') diff --git a/cli/tests/unit_node/process_test.ts b/cli/tests/unit_node/process_test.ts index cd0dff0a4..a572f11b2 100644 --- a/cli/tests/unit_node/process_test.ts +++ b/cli/tests/unit_node/process_test.ts @@ -365,6 +365,8 @@ Deno.test({ name: "process.stdin readable with a TTY", // TODO(PolarETech): Run this test even in non tty environment ignore: !Deno.isatty(Deno.stdin.rid), + // stdin resource is present before the test starts. + sanitizeResources: false, async fn() { const promise = deferred(); const expected = ["foo", "bar", null, "end"]; -- cgit v1.2.3