blob: 3358bab90e7569335849d90be48989f2857f4178 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
'use strict';
const common = require('../common');
const { once } = require('events');
const et = new EventTarget();
(async function() {
await once(et, 'foo');
await once(et, 'foo');
})().then(common.mustCall());
et.dispatchEvent(new Event('foo'));
setImmediate(() => {
et.dispatchEvent(new Event('foo'));
});
|