From 0a78bfb836f520d3709a32c8a978d08d33198d83 Mon Sep 17 00:00:00 2001 From: "Kevin (Kun) \"Kassimo\" Qian" Date: Thu, 16 Jan 2020 16:42:58 -0800 Subject: Add Deno.symbols and move internal fields for test (#3693) --- cli/js/console.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'cli/js/console.ts') diff --git a/cli/js/console.ts b/cli/js/console.ts index f366eb776..f5830b4a1 100644 --- a/cli/js/console.ts +++ b/cli/js/console.ts @@ -4,6 +4,7 @@ import { TypedArray } from "./types.ts"; import { TextEncoder } from "./text_encoding.ts"; import { File, stdout } from "./files.ts"; import { cliTable } from "./console_table.ts"; +import { exposeForTest } from "./internals.ts"; type ConsoleContext = Set; type ConsoleOptions = Partial<{ @@ -363,9 +364,7 @@ function createObjectString( } } -/** TODO Do not expose this from "deno" namespace. - * @internal - */ +/** @internal */ export function stringifyArgs( args: unknown[], options: ConsoleOptions = {} @@ -785,3 +784,7 @@ export function inspect(value: unknown, options?: ConsoleOptions): string { ); } } + +// Expose these fields to internalObject for tests. +exposeForTest("Console", Console); +exposeForTest("stringifyArgs", stringifyArgs); -- cgit v1.2.3