0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-01 12:16:11 -05:00

fix(ext/node): reference error in zlib.crc32 (#27777)

Fixes https://github.com/denoland/deno/issues/27774
This commit is contained in:
Divy Srivastava 2025-01-22 20:01:17 +05:30 committed by GitHub
parent 32eb991ef8
commit f3c0bbf926
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -45,6 +45,7 @@ import { validateUint32 } from "ext:deno_node/internal/validators.mjs";
import { op_zlib_crc32 } from "ext:core/ops";
import { core, primordials } from "ext:core/mod.js";
import { TextEncoder } from "ext:deno_web/08_text_encoding.js";
import { isArrayBufferView } from "ext:deno_node/internal/util/types.ts";
const {
Uint8Array,
TypedArrayPrototypeGetBuffer,

View file

@ -1,6 +1,6 @@
// Copyright 2018-2025 the Deno authors. MIT license.
import { assert, assertEquals } from "@std/assert";
import { assert, assertEquals, assertThrows } from "@std/assert";
import { fromFileUrl, relative } from "@std/path";
import {
brotliCompress,
@ -229,4 +229,6 @@ Deno.test("gzip() and gzipSync() accept ArrayBuffer", async () => {
Deno.test("crc32()", () => {
assertEquals(crc32("hello world"), 222957957);
// @ts-expect-error: passing an object
assertThrows(() => crc32({}), TypeError);
});