Skip to content

Commit 46c7cef

Browse files
authored
test: migrate util message tests from Python to JS
1 parent dfe438d commit 46c7cef

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict';
2+
3+
require('../../common');
4+
const util = require('util');
5+
6+
const err = new Error('foo\nbar');
7+
8+
console.log(util.inspect({ err, nested: { err } }, { compact: true }));
9+
console.log(util.inspect({ err, nested: { err } }, { compact: false }));
10+
11+
err.foo = 'bar';
12+
console.log(util.inspect(err, { compact: true, breakLength: 5 }));

0 commit comments

Comments
 (0)