diff options
Diffstat (limited to 'test/parallel')
-rw-r--r-- | test/parallel/test-console-table.js | 20 | ||||
-rw-r--r-- | test/parallel/test-util-inspect.js | 4 |
2 files changed, 22 insertions, 2 deletions
diff --git a/test/parallel/test-console-table.js b/test/parallel/test-console-table.js index 9ff4641d65..844d2e01e4 100644 --- a/test/parallel/test-console-table.js +++ b/test/parallel/test-console-table.js @@ -120,6 +120,26 @@ test(new Map([[1, 1], [2, 2], [3, 3]]).entries(), ` └───────────────────┴─────┴────────┘ `); +test(new Map([[1, 1], [2, 2], [3, 3]]).values(), ` +┌───────────────────┬────────┐ +│ (iteration index) │ Values │ +├───────────────────┼────────┤ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ +└───────────────────┴────────┘ +`); + +test(new Map([[1, 1], [2, 2], [3, 3]]).keys(), ` +┌───────────────────┬────────┐ +│ (iteration index) │ Values │ +├───────────────────┼────────┤ +│ 0 │ 1 │ +│ 1 │ 2 │ +│ 2 │ 3 │ +└───────────────────┴────────┘ +`); + test(new Set([1, 2, 3]).values(), ` ┌───────────────────┬────────┐ │ (iteration index) │ Values │ diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 1f05f4987e..f97ab95cde 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -447,13 +447,13 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324'); { const map = new Map(); map.set(1, 2); - const vals = previewEntries(map.entries()); + const [ vals ] = previewEntries(map.entries()); const valsOutput = []; for (const o of vals) { valsOutput.push(o); } - assert.strictEqual(util.inspect(valsOutput), '[ [ 1, 2 ] ]'); + assert.strictEqual(util.inspect(valsOutput), '[ 1, 2 ]'); } // Test for other constructors in different context. |