wait-for-expect

  • Version 3.0.2
  • Published
  • 32.2 kB
  • No dependencies
  • MIT license

Install

npm i wait-for-expect
yarn add wait-for-expect
pnpm add wait-for-expect

Overview

Wait for expectation to be true, useful for integration and end to end testing

Index

Variables

Variables

variable waitForExpect

const waitForExpect: {
(
expectation: () => void | Promise<void>,
timeout?: number,
interval?: number
): Promise<{}>;
defaults: { timeout: number; interval: number };
};
  • Waits for the expectation to pass and returns a Promise

    Parameter expectation

    Function Expectation that has to complete without throwing

    Parameter timeout

    Number Maximum wait interval, 4500ms by default

    Parameter interval

    Number Wait-between-retries interval, 50ms by default Promise Promise to return a callback result

Package Files (1)

Dependencies (0)

No dependencies.

Dev Dependencies (27)

Peer Dependencies (0)

No peer dependencies.

Badge

To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/wait-for-expect.

  • Markdown
    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/wait-for-expect)
  • HTML
    <a href="https://www.jsdocs.io/package/wait-for-expect"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>