Skip to content

chore(async/await): document async/await better #60

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

Merged
merged 1 commit into from
Nov 1, 2016

Conversation

sjelin
Copy link
Contributor

@sjelin sjelin commented Nov 1, 2016

The old documentation missed the major issue described here: SeleniumHQ/selenium#3037


`async` functions and the `await` keyword are likely coming in ES7, and
available via several compilers. At the moment, they often break the WebDriver
control flow
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit . huh?

sharedVal = await driver.getValueA(); // Async unwraps this to 'a'
expect(sharedVal).toBe('a');
await driver.sleep(1000); // Normally you wouldn't need to `await` this, but
// the control flow is broken for async functions
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too. I always forget that...

@sjelin sjelin merged commit 35d2ac8 into angular:jasminewd2 Nov 1, 2016
cnishina pushed a commit to cnishina/jasminewd that referenced this pull request Jan 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants