Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a await spec.pause(i) helper #6

Closed
jalada opened this issue Feb 3, 2017 · 0 comments
Closed

Add a await spec.pause(i) helper #6

jalada opened this issue Feb 3, 2017 · 0 comments

Comments

@jalada
Copy link
Contributor

jalada commented Feb 3, 2017

Sometimes you just want your spec to pause or slow down, maybe to visually confirm something, or because it's too fiddly to use exists to wait for something to happen.

const pause = function(i) {
  const p = new Promise((resolve, reject) => {
    setTimeout(function() {
      resolve();
    }, i);
  });

  return p;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant