Skip to content
Permalink
Browse files

test: add util inspect null getter test

PR-URL: #27884
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
  • Loading branch information...
mihan007 authored and Trott committed May 26, 2019
1 parent 2c640bf commit 1dbf2765bc30745dd7e221e96e88f010526d13a4
Showing with 9 additions and 0 deletions.
  1. +9 −0 test/parallel/test-util-inspect.js
@@ -339,6 +339,15 @@ assert.strictEqual(
const value = {};
value.a = value;
assert.strictEqual(util.inspect(value), '<ref *1> { a: [Circular *1] }');
const getterFn = {
get one() {
return null;
}
};
assert.strictEqual(
util.inspect(getterFn, { getters: true }),
'{ one: [Getter: null] }'
);
}
// Array with dynamic properties.

0 comments on commit 1dbf276

Please sign in to comment.
You can’t perform that action at this time.