Skip to content

Commit f85647b

Browse files
committed
fixup! util: add test case with getter throwing undefined
1 parent bcb98f7 commit f85647b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/parallel/test-util-inspect.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2560,6 +2560,13 @@ assert.strictEqual(
25602560
}, { getters: true }),
25612561
'{ foo: [Getter: <Inspection threw>] }'
25622562
);
2563+
assert.strictEqual(
2564+
inspect({
2565+
// eslint-disable-next-line no-throw-literal
2566+
get foo() { throw undefined; }
2567+
}, { getters: true }),
2568+
'{ foo: [Getter: <Inspection threw>] }'
2569+
);
25632570
assert.strictEqual(
25642571
inspect({
25652572
// eslint-disable-next-line no-throw-literal

0 commit comments

Comments
 (0)