summaryrefslogtreecommitdiff
path: root/tests/unit_node/util_test.ts
diff options
context:
space:
mode:
authorMarvin Hagemeister <marvin@deno.com>2024-08-08 13:52:14 +0200
committerGitHub <noreply@github.com>2024-08-08 13:52:14 +0200
commitf50d38869d004fdcfbbdd165f634ab4a4a612d1f (patch)
treec38c884d2763e4f17c681723b7ee830c4379a6f7 /tests/unit_node/util_test.ts
parent65224786d2661fc9d1c42fba17d66079600db6ad (diff)
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
Diffstat (limited to 'tests/unit_node/util_test.ts')
-rw-r--r--tests/unit_node/util_test.ts8
1 files changed, 8 insertions, 0 deletions
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);
+});