mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
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
This commit is contained in:
parent
65224786d2
commit
f50d38869d
2 changed files with 10 additions and 0 deletions
|
@ -47,6 +47,7 @@ import { parseArgs } from "ext:deno_node/internal/util/parse_args/parse_args.js"
|
|||
export {
|
||||
callbackify,
|
||||
debuglog,
|
||||
debuglog as debug,
|
||||
format,
|
||||
formatWithOptions,
|
||||
inspect,
|
||||
|
@ -321,5 +322,6 @@ export default {
|
|||
toUSVString,
|
||||
log,
|
||||
debuglog,
|
||||
debug: debuglog,
|
||||
isDeepStrictEqual,
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue