Skip to content

Commit bf43b8a

Browse files
committed
test: use check output type instead of using doesNotThrow
1 parent 830ace5 commit bf43b8a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/parallel/test-eventtarget-custom-inspect-does-not-throw.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ const fakeEventTarget = {
1212
someOtherField: 42
1313
};
1414

15-
assert.doesNotThrow(() => {
16-
util.inspect(fakeEventTarget);
17-
});
15+
// should not throw when calling the custom inspect method
16+
const output = util.inspect(fakeEventTarget);
17+
18+
assert.strictEqual(typeof output, 'string');
19+

0 commit comments

Comments
 (0)