summaryrefslogtreecommitdiff
path: root/test/parallel/test-util-inspect.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-03-15 20:24:10 +0100
committerJames M Snell <jasnell@gmail.com>2018-04-14 10:43:35 -0700
commitf2d112c6b7e81263de7ff911fa189a336d863892 (patch)
tree00eb1921f1c54b3d2dacb82f47eefb49bed40f59 /test/parallel/test-util-inspect.js
parent2f9775995f6b2438db7eaacfa37989fe21195321 (diff)
downloadandroid-node-v8-f2d112c6b7e81263de7ff911fa189a336d863892.tar.gz
android-node-v8-f2d112c6b7e81263de7ff911fa189a336d863892.tar.bz2
android-node-v8-f2d112c6b7e81263de7ff911fa189a336d863892.zip
util: inspect arguments properly
Right now it is not possible to distinguish arguments from a regular object. This adds a arguments indicator. PR-URL: https://github.com/nodejs/node/pull/19467 Reviewed-By: Matteo Collina <matteo.collina@gmail.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.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js
index bdf4464121..b5ef8dca08 100644
--- a/test/parallel/test-util-inspect.js
+++ b/test/parallel/test-util-inspect.js
@@ -1399,3 +1399,8 @@ util.inspect(process);
'extra: true }';
assert(out === expect || out === expectAlt);
}
+
+{ // Test argument objects.
+ const args = (function() { return arguments; })('a');
+ assert.strictEqual(util.inspect(args), "[Arguments] { '0': 'a' }");
+}