mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
890760b8e5
PR-URL: https://github.com/nodejs/node/pull/54070 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
31 lines
684 B
JavaScript
31 lines
684 B
JavaScript
// flags: --frozen-intrinsics
|
|
'use strict';
|
|
require('../common');
|
|
console.clear();
|
|
|
|
const consoleMethods = ['log', 'info', 'warn', 'error', 'debug', 'trace'];
|
|
|
|
for (const method of consoleMethods) {
|
|
console[method]('foo');
|
|
console[method]('foo', 'bar');
|
|
console[method]('%s %s', 'foo', 'bar', 'hop');
|
|
}
|
|
|
|
console.dir({ slashes: '\\\\' });
|
|
console.dirxml({ slashes: '\\\\' });
|
|
|
|
console.time('label');
|
|
console.timeLog('label', 'hi');
|
|
console.timeEnd('label');
|
|
|
|
console.assert(true, 'true');
|
|
|
|
console.count('label');
|
|
console.countReset('label');
|
|
|
|
console.group('label');
|
|
console.groupCollapsed('label');
|
|
console.groupEnd();
|
|
|
|
console.table([{ a: 1, b: 2 }, { a: 'foo', b: 'bar' }]);
|