Skip to content

Commit 3981926

Browse files
test: use long object to verify breakLength Infinity bypasses line splits
1 parent a10b087 commit 3981926

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/parallel/test-util-inspect.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4059,8 +4059,8 @@ ${error.stack.split('\n').slice(1).join('\n')}`,
40594059
delete Error[Symbol.hasInstance];
40604060
}
40614061

4062-
{ // test case
4063-
const obj = { a: 1, b: 2, c: 3, d: 4 };
4062+
{
4063+
const obj = { long: 'a'.repeat(100), another: 'b'.repeat(100) };
40644064
const result = util.inspect(obj, { breakLength: Infinity });
4065-
assert.strictEqual(result, '{ a: 1, b: 2, c: 3, d: 4 }');
4066-
}
4065+
assert.strictEqual(result.includes('\n'), false);
4066+
}

0 commit comments

Comments
 (0)