Skip to content

Commit

Permalink
code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wentout committed May 30, 2019
1 parent 5e41d93 commit 3eca651
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,13 +504,6 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324');
assert.strictEqual(util.inspect(a), "[ 'foo', 'bar', 'baz' ]");
delete a[1];
assert.strictEqual(util.inspect(a), "[ 'foo', <1 empty item>, 'baz' ]");
a.push('qux');
a.splice(3, 0, undefined);
delete a[3];
assert.strictEqual(util.inspect(a, {
maxArrayLength: 2
}), "[ 'foo', <1 empty item>, ... 3 more items ]");
a.splice(3, 2);
assert.strictEqual(
util.inspect(a, true),
"[ 'foo', <1 empty item>, 'baz', [length]: 3 ]"
Expand All @@ -527,6 +520,10 @@ assert.strictEqual(util.inspect(-5e-324), '-5e-324');
util.inspect(a, { maxArrayLength: 4 }),
"[ 'foo', <1 empty item>, 'baz', <97 empty items>, ... 1 more item ]"
);
// test 4 special case
assert.strictEqual(util.inspect(a, {
maxArrayLength: 2
}), "[ 'foo', <1 empty item>, ... 99 more items ]");
}

// Test for Array constructor in different context.
Expand Down

0 comments on commit 3eca651

Please sign in to comment.