How to use wait-for-expect - 5 common examples

To help you get started, we’ve selected a few wait-for-expect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github testing-library / pptr-testing-library / lib / index.ts View on Github external
export function wait(
  callback: () => any = () => undefined,
  {timeout = 4500, interval = 50} = {}, // tslint:disable-line
): Promise<{}> {
  return waitForExpect(callback, timeout, interval)
}
github testing-library / native-testing-library / src / lib / wait.js View on Github external
function wait(callback = () => {}, { timeout = 4500, interval = 50 } = {}) {
  return waitForExpect(callback, timeout, interval);
}
github testing-library / dom-testing-library / src / wait.js View on Github external
function wait(callback = () => {}, {timeout = getConfig().asyncUtilTimeout, interval = 50} = {}) {
  return waitForExpect(callback, timeout, interval)
}
github instructure / instructure-ui / packages / ui-test-utils / src / utils / waitForExpect.js View on Github external
function waitForExpect (callback = () => {}, { timeout = 1900, interval = 50 } = {}) {
   return _waitForExpect(callback, timeout, interval)
 }
github burtonator / polar-bookshelf / web / spectron0 / firebase-cloud-aware-datastore / content.ts View on Github external
cloudAwareDatastore.shutdownHook = async () => {

        await waitForExpect(async () => {

            console.log("Checking consistency...");

            const consistency = await Datastores.checkConsistency(diskDatastore, firebaseDatastore);

            if (! consistency.consistent) {
                console.log("Filesystems are NOT consistent: ", consistency.manifest0, consistency.manifest1);
            }

            assert.ok(consistency.consistent, "Datastores are not consistent");

        }, TIMEOUT);

    };

wait-for-expect

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

MIT
Latest version published 4 years ago

Package Health Score

65 / 100
Full package analysis

Popular wait-for-expect functions