summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-12-01 01:08:37 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-12-07 00:38:29 +0100
commite11b909097e44a7acc77cf5f6e8be3016d3d4f6f (patch)
tree1683cbe8eb247d4784b60b789a1e76a8358d5371 /test
parentc430aebe8683699fc072cb87e5be03af370a3f2f (diff)
downloadandroid-node-v8-e11b909097e44a7acc77cf5f6e8be3016d3d4f6f.tar.gz
android-node-v8-e11b909097e44a7acc77cf5f6e8be3016d3d4f6f.tar.bz2
android-node-v8-e11b909097e44a7acc77cf5f6e8be3016d3d4f6f.zip
util: never trigger any proxy traps using `format()`
PR-URL: https://github.com/nodejs/node/pull/30767 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-util-inspect-proxy.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/parallel/test-util-inspect-proxy.js b/test/parallel/test-util-inspect-proxy.js
index c684026b19..505503d579 100644
--- a/test/parallel/test-util-inspect-proxy.js
+++ b/test/parallel/test-util-inspect-proxy.js
@@ -41,6 +41,9 @@ proxyObj = new Proxy(target, handler);
// Inspecting the proxy should not actually walk it's properties
util.inspect(proxyObj, opts);
+// Make sure inspecting object does not trigger any proxy traps.
+util.format('%s', proxyObj);
+
// getProxyDetails is an internal method, not intended for public use.
// This is here to test that the internals are working correctly.
let details = processUtil.getProxyDetails(proxyObj, true);