Node TAP
    Preparing search index...

    Variable emits

    emits: (
        emitter: EventEmitter<DefaultEventMap> | EventTarget,
        event: string,
        ...__namedParameters: MessageExtra,
    ) => Promise<void>

    Type Declaration

      • (
            emitter: EventEmitter<DefaultEventMap> | EventTarget,
            event: string,
            ...__namedParameters: MessageExtra,
        ): Promise<void>
      • Asserts that the emitter emits the specified event before the test ends. Returns a promise that resolves when the event is emitted. Note that waiting on the returned promise within a test can deadlock the test, if the event never emits, but the returned promise can be a handy way to pause a test until an event happens, if you are reasonably confident that it will fire.

        Parameters

        • emitter: EventEmitter<DefaultEventMap> | EventTarget
        • event: string
        • ...__namedParameters: MessageExtra

        Returns Promise<void>