pentf
    Preparing search index...

    Function assertEventually

    • Assert that a condition is eventually true.

      Parameters

      • testfunc: () => any

        The test function. Must return true to signal success.

      • Optionalmessage: {
            checkEvery?: number;
            crashOnError?: boolean;
            message?: string;
            messageFunc?: () => string;
            timeout?: number;
        } = {}

        Error message shown if the condition never becomes true within the timeout.

      Returns Promise<any>

      let called = false;
      setTimeout(() => {called = true;}, 2000);
      await assertEventually(() => called);