|
|
@ -43,13 +43,17 @@ console.log('foo', 'bar'); |
|
|
|
console.log('%s %s', 'foo', 'bar', 'hop'); |
|
|
|
console.log({slashes: '\\\\'}); |
|
|
|
|
|
|
|
console._stderr = process.stdout; |
|
|
|
console.trace('This is a %j %d', { formatted: 'trace' }, 10, 'foo'); |
|
|
|
|
|
|
|
global.process.stdout.write = stdout_write; |
|
|
|
|
|
|
|
assert.equal('foo\n', strings.shift()); |
|
|
|
assert.equal('foo bar\n', strings.shift()); |
|
|
|
assert.equal('foo bar hop\n', strings.shift()); |
|
|
|
assert.equal("{ slashes: '\\\\\\\\' }\n", strings.shift()); |
|
|
|
|
|
|
|
process.stderr.write('hello world'); |
|
|
|
assert.equal('Trace: This is a {"formatted":"trace"} 10 foo', |
|
|
|
strings.shift().split('\n').shift()); |
|
|
|
|
|
|
|
assert.throws(function () { |
|
|
|
console.timeEnd('no such label'); |
|
|
|