summaryrefslogtreecommitdiff
path: root/js/console_test.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2019-01-07 06:34:52 +0900
committerRyan Dahl <ry@tinyclouds.org>2019-01-06 16:34:52 -0500
commitcae71ed8416cba63a2be8c9068b3a3e0b148a32a (patch)
tree1c6ed1b3dbb9fd65f02fd39d32fa627dc9d7f04b /js/console_test.ts
parent1b7938e3aa0ba1fb7ad7d6699f01cbf3c8a4196c (diff)
Implement console.groupCollapsed (#1452)
This implementation of groupCollapsed is intentionally different from the spec defined by whatwg. See the conversation in #1355 and #1363.
Diffstat (limited to 'js/console_test.ts')
-rw-r--r--js/console_test.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/js/console_test.ts b/js/console_test.ts
index 3f045db86..6b6411ae8 100644
--- a/js/console_test.ts
+++ b/js/console_test.ts
@@ -116,7 +116,7 @@ test(function consoleTestStringifyCircular() {
assertEqual(
stringify(console),
// tslint:disable-next-line:max-line-length
- "Console { printFunc: [Function], log: [Function], debug: [Function], info: [Function], dir: [Function], warn: [Function], error: [Function], assert: [Function], count: [Function], countReset: [Function], time: [Function], timeLog: [Function], timeEnd: [Function] }"
+ "Console { printFunc: [Function], log: [Function], debug: [Function], info: [Function], dir: [Function], warn: [Function], error: [Function], assert: [Function], count: [Function], countReset: [Function], time: [Function], timeLog: [Function], timeEnd: [Function], group: [Function], groupCollapsed: [Function], groupEnd: [Function], indentLevel: 0, collapsedAt: null }"
);
// test inspect is working the same
assertEqual(inspect(nestedObj), nestedObjExpected);
@@ -189,6 +189,8 @@ test(function consoleDetachedLog() {
const consoleTime = console.time;
const consoleTimeLog = console.timeLog;
const consoleTimeEnd = console.timeEnd;
+ const consoleGroup = console.group;
+ const consoleGroupEnd = console.groupEnd;
log("Hello world");
dir("Hello world");
debug("Hello world");
@@ -201,4 +203,6 @@ test(function consoleDetachedLog() {
consoleTime("Hello world");
consoleTimeLog("Hello world");
consoleTimeEnd("Hello world");
+ consoleGroup("Hello world");
+ consoleGroupEnd();
});