Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
littledivy committed Aug 11, 2023
1 parent 35b56bd commit a03f1b5
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions cli/tests/unit_node/zlib_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
createDeflate,
} from "node:zlib";
import { Buffer } from "node:buffer";
import { PassThrough } from "node:stream";
import { createReadStream, createWriteStream } from "node:fs";

Deno.test("brotli compression sync", () => {
Expand Down Expand Up @@ -62,8 +63,19 @@ Deno.test("brotli compression", async () => {
}
});

Deno.test("zlib create deflate with dictionary", () => {
createDeflate({
dictionary: Buffer.alloc(0),
});
});
Deno.test(
"zlib create deflate with dictionary",
{ sanitizeResources: false },
async () => {
const promise = deferred();
const handle = createDeflate({
dictionary: Buffer.alloc(0),
});

handle.on("close", () => promise.resolve());
handle.end();
handle.destroy();

await promise;
},
);

0 comments on commit a03f1b5

Please sign in to comment.