diff options
author | Anna Henningsen <anna@addaleax.net> | 2017-03-31 22:35:54 +0200 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-04-03 10:08:26 +0200 |
commit | 3cc3e099be79274a188b2ce32f9cabddfc58ea8d (patch) | |
tree | 1752dfd73010f4d84c3f2bb3b2912e31b9e7a7f4 /test | |
parent | 91383e47fdbb87ae45365396dd0150dcad8ed967 (diff) | |
download | android-node-v8-3cc3e099be79274a188b2ce32f9cabddfc58ea8d.tar.gz android-node-v8-3cc3e099be79274a188b2ce32f9cabddfc58ea8d.tar.bz2 android-node-v8-3cc3e099be79274a188b2ce32f9cabddfc58ea8d.zip |
util: show External values explicitly in inspect
Display `v8::External` values as `[External]` rather than `{}`
which makes them look like objects.
PR-URL: https://github.com/nodejs/node/pull/12151
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-util-inspect.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 32e36135ef..ab4964f9e7 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -82,6 +82,9 @@ assert.strictEqual(util.inspect(Object.assign(new String('hello'), { [Symbol('foo')]: 123 }), { showHidden: true }), '{ [String: \'hello\'] [length]: 5, [Symbol(foo)]: 123 }'); +assert.strictEqual(util.inspect(process.stdin._handle._externalStream), + '[External]'); + { const regexp = /regexp/; regexp.aprop = 42; |