Skip to content

Commit

Permalink
test: add util inspect null getter test
Browse files Browse the repository at this point in the history
PR-URL: #27884
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Anto Aravinth <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Сковорода Никита Андреевич <[email protected]>
  • Loading branch information
mihan007 authored and targos committed May 31, 2019
1 parent 0e1ce20 commit 38e3827
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/parallel/test-util-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,15 @@ assert.strictEqual(
const value = {};
value.a = value;
assert.strictEqual(util.inspect(value), '{ a: [Circular] }');
const getterFn = {
get one() {
return null;
}
};
assert.strictEqual(
util.inspect(getterFn, { getters: true }),
'{ one: [Getter: null] }'
);
}

// Array with dynamic properties.
Expand Down

0 comments on commit 38e3827

Please sign in to comment.