Browse Source

test: check inspect array with empty string key

PR-URL: https://github.com/nodejs/node/pull/15258
Refs: https://github.com/nodejs/node/issues/15159
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
canary-base
Rahul Mishra 7 years ago
committed by Ruben Bridgewater
parent
commit
21a3ae3574
No known key found for this signature in database GPG Key ID: F07496B3EB3C1762
  1. 6
      test/parallel/test-util-inspect.js

6
test/parallel/test-util-inspect.js

@ -968,6 +968,12 @@ if (typeof Symbol !== 'undefined') {
assert.strictEqual(util.inspect(x), '{}');
}
{
const x = [];
x[''] = 1;
assert.strictEqual(util.inspect(x), '[ \'\': 1 ]');
}
// The following maxArrayLength tests were introduced after v6.0.0 was released.
// Do not backport to v5/v4 unless all of
// https://github.com/nodejs/node/pull/6334 is backported.

Loading…
Cancel
Save