Skip to content

Commit 3eca651

Browse files
committed
code review fixes
1 parent 5e41d93 commit 3eca651

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

test/parallel/test-util-inspect.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -504,13 +504,6 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324');
504504
assert.strictEqual(util.inspect(a), "[ 'foo', 'bar', 'baz' ]");
505505
delete a[1];
506506
assert.strictEqual(util.inspect(a), "[ 'foo', <1 empty item>, 'baz' ]");
507-
a.push('qux');
508-
a.splice(3, 0, undefined);
509-
delete a[3];
510-
assert.strictEqual(util.inspect(a, {
511-
maxArrayLength: 2
512-
}), "[ 'foo', <1 empty item>, ... 3 more items ]");
513-
a.splice(3, 2);
514507
assert.strictEqual(
515508
util.inspect(a, true),
516509
"[ 'foo', <1 empty item>, 'baz', [length]: 3 ]"
@@ -527,6 +520,10 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324');
527520
util.inspect(a, { maxArrayLength: 4 }),
528521
"[ 'foo', <1 empty item>, 'baz', <97 empty items>, ... 1 more item ]"
529522
);
523+
// test 4 special case
524+
assert.strictEqual(util.inspect(a, {
525+
maxArrayLength: 2
526+
}), "[ 'foo', <1 empty item>, ... 99 more items ]");
530527
}
531528

532529
// Test for Array constructor in different context.

0 commit comments

Comments
 (0)