summaryrefslogtreecommitdiff
path: root/cli/tests/unit/read_file_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit/read_file_test.ts')
-rw-r--r--cli/tests/unit/read_file_test.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/unit/read_file_test.ts b/cli/tests/unit/read_file_test.ts
index 0d25ea6d8..24cf6dccf 100644
--- a/cli/tests/unit/read_file_test.ts
+++ b/cli/tests/unit/read_file_test.ts
@@ -140,6 +140,17 @@ Deno.test(
},
);
+// Test that AbortController's cancel handle is cleaned-up correctly, and do not leak resources.
+Deno.test(
+ { permissions: { read: true } },
+ async function readFileWithAbortSignalNotCalled() {
+ const ac = new AbortController();
+ await Deno.readFile("cli/tests/testdata/assets/fixture.json", {
+ signal: ac.signal,
+ });
+ },
+);
+
Deno.test(
{ permissions: { read: true }, ignore: Deno.build.os !== "linux" },
async function readFileProcFs() {