From f50d38869d004fdcfbbdd165f634ab4a4a612d1f Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Thu, 8 Aug 2024 13:52:14 +0200 Subject: fix(node/util): add missing `debug` alias of `debuglog` (#24944) Add the missing `node:util.debug` export which is an alias of `node:util.debuglog`, see https://nodejs.org/api/util.html#utildebugsection --- tests/unit_node/util_test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/unit_node/util_test.ts b/tests/unit_node/util_test.ts index f245a647a..2b639538c 100644 --- a/tests/unit_node/util_test.ts +++ b/tests/unit_node/util_test.ts @@ -8,6 +8,7 @@ import { } from "@std/assert"; import { stripAnsiCode } from "@std/fmt/colors"; import * as util from "node:util"; +import utilDefault from "node:util"; import { Buffer } from "node:buffer"; Deno.test({ @@ -322,3 +323,10 @@ Deno.test({ util.parseArgs({}); }, }); + +Deno.test("[util] debuglog() and debug()", () => { + assert(typeof util.debug === "function"); + assert(typeof util.debuglog === "function"); + assertEquals(util.debuglog, util.debug); + assertEquals(utilDefault.debuglog, utilDefault.debug); +}); -- cgit v1.2.3