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

Tests: Allow running async/await in test files #81

Merged
merged 2 commits into from
Sep 26, 2019

Conversation

dmsnell
Copy link
Contributor

@dmsnell dmsnell commented Sep 26, 2019

We have previously not been able to use async/await in our test files.
This can lead to particularly deep nesting or callback-passing when we
are trying to sequence events for the purpose of the test.

In this change we're adding the babel-polyfill to allow us to use
those constructs and linearize the async flows.

Testing

Since this only impacts tests, just run npm test
Apart from that it's indeterminate if the patch was successful or not.

We have previously not been able to use `async/await` in our test files.
This can lead to particularly deep nesting or callback-passing when we
are trying to sequence events for the purpose of the test.

In this change we're adding the `babel-polyfill` to allow us to use
those constructs and _linearize_ the async flows.
@dmsnell dmsnell requested a review from a team September 26, 2019 22:03
Copy link
Contributor

@belcherj belcherj left a comment

Choose a reason for hiding this comment

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

Did not test but agree completely with the code change

@dmsnell dmsnell merged commit d45669e into master Sep 26, 2019
@dmsnell dmsnell deleted the tests/allow-async-in-tests branch September 26, 2019 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants