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

Improve async component mounting #24

Merged
merged 7 commits into from Mar 5, 2020
Merged

Improve async component mounting #24

merged 7 commits into from Mar 5, 2020

Conversation

SHA-4
Copy link
Contributor

@SHA-4 SHA-4 commented Mar 5, 2020

This PR fixes some flakiness we had with some of our tests, mainly by addressing enzymejs/enzyme#1587 and by awaiting the componentDidMount of our component.

It also makes tester mount async by default, simplifying our tests.

Example code before:

const tester = await new Tester(MyComponent).mount({ async: true });
await tester.refresh(100); // this would be a guess for how long we needed to wait

Example code after:

const tester = await new Tester(MyComponent).mount();

@SHA-4 SHA-4 merged commit 8197d07 into master Mar 5, 2020
@SHA-4 SHA-4 deleted the fix-async-mount branch March 5, 2020 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants