• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3const { once } = require('events');
4
5const et = new EventTarget();
6(async function() {
7  await once(et, 'foo');
8  await once(et, 'foo');
9})().then(common.mustCall());
10
11et.dispatchEvent(new Event('foo'));
12setImmediate(() => {
13  et.dispatchEvent(new Event('foo'));
14});
15