diff --git a/cli/tests/unit_node/process_test.ts b/cli/tests/unit_node/process_test.ts index cd0dff0a4d..a572f11b2d 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"]; diff --git a/ext/io/12_io.js b/ext/io/12_io.js index 1bb8f9fba9..e1d72ffb54 100644 --- a/ext/io/12_io.js +++ b/ext/io/12_io.js @@ -241,7 +241,7 @@ class Stdin { } close() { - core.close(this.rid); + core.tryClose(this.rid); } get readable() {