From ce79cb579784e8417596fed03f3d2a5bbbad487d Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Sat, 4 Sep 2021 21:16:35 +0800 Subject: refactor(testing): redirect console output via reporter (#11911) This feeds console output to the reporter and handles silencing there instead of in the JavaScript code. --- cli/tests/unit/console_test.ts | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'cli/tests') diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts index eee3d3cf1..8472e5c94 100644 --- a/cli/tests/unit/console_test.ts +++ b/cli/tests/unit/console_test.ts @@ -313,27 +313,27 @@ unitTest(function consoleTestStringifyCircular() { "JSON {}", ); assertEquals( - stringify(console), + stringify(new Console(() => {})), `console { - log: [Function: bound ], - debug: [Function: bound ], - info: [Function: bound ], - dir: [Function: bound ], - dirxml: [Function: bound ], - warn: [Function: bound ], - error: [Function: bound ], - assert: [Function: bound ], - count: [Function: bound ], - countReset: [Function: bound ], - table: [Function: bound ], - time: [Function: bound ], - timeLog: [Function: bound ], - timeEnd: [Function: bound ], - group: [Function: bound ], - groupCollapsed: [Function: bound ], - groupEnd: [Function: bound ], - clear: [Function: bound ], - trace: [Function: bound ], + log: [Function: log], + debug: [Function: debug], + info: [Function: info], + dir: [Function: dir], + dirxml: [Function: dir], + warn: [Function: warn], + error: [Function: error], + assert: [Function: assert], + count: [Function: count], + countReset: [Function: countReset], + table: [Function: table], + time: [Function: time], + timeLog: [Function: timeLog], + timeEnd: [Function: timeEnd], + group: [Function: group], + groupCollapsed: [Function: group], + groupEnd: [Function: groupEnd], + clear: [Function: clear], + trace: [Function: trace], indentLevel: 0, [Symbol(isConsoleInstance)]: true }`, -- cgit v1.2.3