summaryrefslogtreecommitdiff
path: root/test/parallel/test-util-inspect.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-05-17 03:19:56 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2018-05-21 17:38:14 +0200
commit8de83725ac3aa05a12acbbd27012c4282af7635c (patch)
tree09e8c085b15ec63cc0dbeb9b9132c002c24da79e /test/parallel/test-util-inspect.js
parentafd290d22475f268010387bec61b8ceb5a51a46b (diff)
downloadandroid-node-v8-8de83725ac3aa05a12acbbd27012c4282af7635c.tar.gz
android-node-v8-8de83725ac3aa05a12acbbd27012c4282af7635c.tar.bz2
android-node-v8-8de83725ac3aa05a12acbbd27012c4282af7635c.zip
util: remove erroneous whitespace
When inspecting nested objects some times a whitespace was added at the end of a line. This fixes this erroneous space. Besides that the `breakLength` was not followed if a single property was longer than the breakLength. It will now break a single property into the key and value in such cases. PR-URL: https://github.com/nodejs/node/pull/20802 Refs: https://github.com/nodejs/node/issues/20253 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test/parallel/test-util-inspect.js')
-rw-r--r--test/parallel/test-util-inspect.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js
index 0b31c41b29..24fc35747b 100644
--- a/test/parallel/test-util-inspect.js
+++ b/test/parallel/test-util-inspect.js
@@ -571,7 +571,7 @@ assert.strictEqual(util.inspect(Object.create(Date.prototype)), 'Date {}');
{
const x = { [util.inspect.custom]: util.inspect };
assert(util.inspect(x).includes(
- '[Symbol(util.inspect.custom)]: \n { [Function: inspect]'));
+ '[Symbol(util.inspect.custom)]:\n { [Function: inspect]'));
}
// `util.inspect` should display the escaped value of a key.
@@ -1188,7 +1188,7 @@ util.inspect(process);
let out = util.inspect(o, { compact: true, depth: 5, breakLength: 80 });
let expect = [
- '{ a: ',
+ '{ a:',
' [ 1,',
' 2,',
" [ [ 'Lorem ipsum dolor\\nsit amet,\\tconsectetur adipiscing elit, " +