MCPcopy Index your code
hub / github.com/nodejs/node / testLines

Function testLines

test/parallel/test-util-inspect.js:1123–1128  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

1121// without it.
1122{
1123 function testLines(input) {
1124 const countLines = (str) => (str.match(/\n/g) || []).length;
1125 const withoutColor = util.inspect(input);
1126 const withColor = util.inspect(input, { colors: true });
1127 assert.strictEqual(countLines(withoutColor), countLines(withColor));
1128 }
1129
1130 const bigArray = new Array(100).fill().map((value, index) => index);
1131

Callers 1

Calls 2

countLinesFunction · 0.85
inspectMethod · 0.80

Tested by

no test coverage detected