summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2019-02-05 04:17:52 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2019-02-20 18:33:10 +0100
commit3d62d0c4804813ff36a051160a57fc4596804b8f (patch)
tree1fa0728c7751d8184a8f06b90833a2635ce315b1 /test
parente55764747094c8a8475a015ae4bee44f5de90858 (diff)
downloadandroid-node-v8-3d62d0c4804813ff36a051160a57fc4596804b8f.tar.gz
android-node-v8-3d62d0c4804813ff36a051160a57fc4596804b8f.tar.bz2
android-node-v8-3d62d0c4804813ff36a051160a57fc4596804b8f.zip
util: update set iterator entries inspection
The inspection output for Set#entries() was wrong so far as it did not return an array as it should have. That was a bug in V8 that is now fixed and the code in Node.js has to be updated accordingly. PR-URL: https://github.com/nodejs/node/pull/25941 Fixes: https://github.com/nodejs/node/issues/24629 Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-util-inspect.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js
index 76f8caa31a..a9afdbf8af 100644
--- a/test/parallel/test-util-inspect.js
+++ b/test/parallel/test-util-inspect.js
@@ -995,7 +995,8 @@ if (typeof Symbol !== 'undefined') {
const aSet = new Set([1, 3]);
assert.strictEqual(util.inspect(aSet.keys()), '[Set Iterator] { 1, 3 }');
assert.strictEqual(util.inspect(aSet.values()), '[Set Iterator] { 1, 3 }');
- assert.strictEqual(util.inspect(aSet.entries()), '[Set Iterator] { 1, 3 }');
+ assert.strictEqual(util.inspect(aSet.entries()),
+ '[Set Iterator] { [ 1, 1 ], [ 3, 3 ] }');
// Make sure the iterator doesn't get consumed.
const keys = aSet.keys();
assert.strictEqual(util.inspect(keys), '[Set Iterator] { 1, 3 }');
@@ -1609,7 +1610,7 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
[{ a: 5 }, '{ a: 5 }'],
[new Set([1, 2]), 'Set { 1, 2 }'],
[new Map([[1, 2]]), 'Map { 1 => 2 }'],
- [new Set([1, 2]).entries(), '[Set Iterator] { 1, 2 }'],
+ [new Set([1, 2]).entries(), '[Set Iterator] { [ 1, 1 ], [ 2, 2 ] }'],
[new Map([[1, 2]]).keys(), '[Map Iterator] { 1 }'],
[new Date(2000), '1970-01-01T00:00:02.000Z'],
[new Uint8Array(2), 'Uint8Array [ 0, 0 ]'],