Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ it('should run tests with async/await', async () => {
Without this library and the `promisify` function/method, the expectation of `bar` would fail with `expected undefined to equal 'bar'`

## Why use this library?
The question about how to use async/await in Cypress test comes up from time to time in the gitter chat as well as in [GitHub Issue #1417](https://github.com/cypress-io/cypress/issues/1417). Sometimes you needs a value out of a chain and using `.then` just increases the nesting level, decreasing readability:
The question about how to use async/await in Cypress test comes up from time to time in the gitter chat as well as in [GitHub Issue #1417](https://github.com/cypress-io/cypress/issues/1417). Sometimes you need a value out of a chain and using `.then` just increases the nesting level, decreasing readability:

```ts
cy.get('.mySelector')
Expand Down Expand Up @@ -105,6 +105,10 @@ cy.get('.someInput').type(text)
```
npm install cypress-promise -D
```
or
```
yarn add cypress-promise -D
```

If you get errors like "regeneratorRuntime is not defined.", you'll have to install `babel-polyfill` and add `import 'babel-polyfill'` to your `cypress/support/index`.

Expand Down