summaryrefslogtreecommitdiff
path: root/test/parallel/test-util-inspect.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2016-11-16 02:27:14 +0100
committerAnna Henningsen <anna@addaleax.net>2016-11-20 01:40:33 +0100
commit3295a7febad0502dd79ad9fdae4c0975d1fb271c (patch)
tree9540bcbabb671a58613ecc30b4c7f5cb00c9e1b6 /test/parallel/test-util-inspect.js
parent6b86ecc007db251047c4a19990eca86af1e4c954 (diff)
downloadnode-new-3295a7febad0502dd79ad9fdae4c0975d1fb271c.tar.gz
src: allow getting Symbols on process.env
1aa595e5bd6 introduced a `throw` for accessing `Symbol` properties of `process.env`. However, this breaks `util.inspect(process)` and things like `Object.prototype.toString.call(process.env)`, so this patch changes the behaviour for the getter to just always return `undefined`. Ref: https://github.com/nodejs/node/pull/9446 Fixes: https://github.com/nodejs/node/issues/9641 PR-URL: https://github.com/nodejs/node/pull/9631 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-util-inspect.js')
-rw-r--r--test/parallel/test-util-inspect.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js
index f730ec1c98..7fd6829542 100644
--- a/test/parallel/test-util-inspect.js
+++ b/test/parallel/test-util-inspect.js
@@ -925,3 +925,5 @@ checkAlignment(new Map(big_array.map(function(y) { return [y, null]; })));
util.inspect.defaultOptions = 'bad';
}, /"options" must be an object/);
}
+
+assert.doesNotThrow(() => util.inspect(process));