util: mark proxied objects as such when inspecting them by BridgeAR · Pull Request #61029 · nodejs/node · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/internal/util/inspect.js
2 changes: 1 addition & 1 deletion test/parallel/test-assert-deep.js
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@ test('Check proxies', () => {
assert.throws(
() => assert.deepStrictEqual(arrProxy, [1, 2, 3]),
{ message: `${defaultMsgStartFull}\n\n` +
' [\n 1,\n 2,\n- 3\n ]\n' }
'+ Proxy([\n- [\n 1,\n 2,\n+ ])\n- 3\n- ]\n' }
);
util.inspect.defaultOptions = tmp;

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ const errorTests = [
},
{
send: 'repl.writer.options.showProxy = false, new Proxy({x:42}, {});',
expect: '{ x: 42 }'
expect: 'Proxy({ x: 42 })'
},

// Newline within template string maintains whitespace.
Expand Down
21 changes: 15 additions & 6 deletions test/parallel/test-util-inspect-proxy.js
Loading