summaryrefslogtreecommitdiff
path: root/cli/tests/unit_node/zlib_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/tests/unit_node/zlib_test.ts')
-rw-r--r--cli/tests/unit_node/zlib_test.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/tests/unit_node/zlib_test.ts b/cli/tests/unit_node/zlib_test.ts
index b878b7cc3..c025849da 100644
--- a/cli/tests/unit_node/zlib_test.ts
+++ b/cli/tests/unit_node/zlib_test.ts
@@ -4,7 +4,6 @@ import {
assert,
assertEquals,
} from "../../../test_util/std/testing/asserts.ts";
-import { deferred } from "../../../test_util/std/async/deferred.ts";
import { fromFileUrl, relative } from "../../../test_util/std/path/mod.ts";
import {
brotliCompressSync,
@@ -24,7 +23,7 @@ Deno.test("brotli compression sync", () => {
});
Deno.test("brotli compression", async () => {
- const promise = deferred();
+ const { promise, resolve } = Promise.withResolvers<void>();
const compress = createBrotliCompress();
const filePath = relative(
Deno.cwd(),
@@ -43,7 +42,7 @@ Deno.test("brotli compression", async () => {
const stream2 = input2.pipe(decompress).pipe(output2);
stream2.on("finish", () => {
- promise.resolve();
+ resolve();
});
});
@@ -73,12 +72,12 @@ Deno.test(
"zlib create deflate with dictionary",
{ sanitizeResources: false },
async () => {
- const promise = deferred();
+ const { promise, resolve } = Promise.withResolvers<void>();
const handle = createDeflate({
dictionary: Buffer.alloc(0),
});
- handle.on("close", () => promise.resolve());
+ handle.on("close", () => resolve());
handle.end();
handle.destroy();