Skip to content

Commit 830ace5

Browse files
committed
test: test eventtarget custom inspect w/o branding
1 parent d3edbd1 commit 830ace5

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'use strict';
2+
3+
const assert = require('assert');
4+
const util = require('util');
5+
6+
const symbol = util.inspect.custom;
7+
8+
const eventTargetInspect = EventTarget.prototype[symbol];
9+
10+
const fakeEventTarget = {
11+
[symbol]: eventTargetInspect,
12+
someOtherField: 42
13+
};
14+
15+
assert.doesNotThrow(() => {
16+
util.inspect(fakeEventTarget);
17+
});

0 commit comments

Comments
 (0)