From 38002ffdd7e602e666e48d39fc84f7093fad9dff Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Wed, 13 Dec 2023 22:28:56 +0530 Subject: fix(zlib): handle no flush flag in handle_.write (#21432) Fixes https://github.com/denoland/deno/issues/21096 --- cli/tests/unit_node/zlib_test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'cli/tests') diff --git a/cli/tests/unit_node/zlib_test.ts b/cli/tests/unit_node/zlib_test.ts index 5f82b1202..fc9eaeb5b 100644 --- a/cli/tests/unit_node/zlib_test.ts +++ b/cli/tests/unit_node/zlib_test.ts @@ -81,3 +81,18 @@ Deno.test( await promise; }, ); + +Deno.test( + "zlib flush i32", + // FIXME: Handle is not closed properly + { sanitizeResources: false }, + function () { + const handle = createDeflate({ + // @ts-expect-error: passing non-int flush value + flush: "", + }); + + handle.end(); + handle.destroy(); + }, +); -- cgit v1.2.3