diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-03-15 20:24:10 +0100 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-04-14 10:43:35 -0700 |
commit | f2d112c6b7e81263de7ff911fa189a336d863892 (patch) | |
tree | 00eb1921f1c54b3d2dacb82f47eefb49bed40f59 /test/parallel/test-util-inspect.js | |
parent | 2f9775995f6b2438db7eaacfa37989fe21195321 (diff) | |
download | android-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.js | 5 |
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' }"); +} |