function oneEvent(eventTarget, eventName) {
  return new Promise(resolve => {
    function listener(ev) {
      resolve(ev);
      eventTarget.removeEventListener(eventName, listener);
    }
    eventTarget.addEventListener(eventName, listener);
  });
}
Listens for one event and resolves with this event object after it was fired.

@example
setTimeout(() => el.fireDone());
await oneEvent(el, 'done');
expect(el.done).to.be.true;

@param eventTarget Target of the event, usually an Element
@param eventName Name of the event
@returns Promise to await until the event has been fired
@type {import("./types.js").OneEventFn}