0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-21 21:19:50 +01:00
nodejs/test/parallel/test-console-issue-43095.js
Daeyeon Jeong f7cd3f6e0c
console: fix console.dir crash on a revoked proxy
Fixes: https://github.com/nodejs/node/issues/43095

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

PR-URL: https://github.com/nodejs/node/pull/43100
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-05-22 11:41:55 +01:00

13 lines
240 B
JavaScript

'use strict';
require('../common');
const { inspect } = require('node:util');
const r = Proxy.revocable({}, {});
r.revoke();
console.dir(r);
console.dir(r.proxy);
console.log(r.proxy);
console.log(inspect(r.proxy, { showProxy: true }));