Skip to content

Use jest's fake timers to fix flaky test#2253

Merged
chandlerprall merged 1 commit intoelastic:masterfrom
chandlerprall:bug/1999-flaky-unit-test
Aug 23, 2019
Merged

Use jest's fake timers to fix flaky test#2253
chandlerprall merged 1 commit intoelastic:masterfrom
chandlerprall:bug/1999-flaky-unit-test

Conversation

@chandlerprall
Copy link
Copy Markdown
Contributor

Summary

Closes #1999 , converts the EuiGlobalToastList tests to use jest's fake timer API instead of hoping setTimeout executes exactly when it's expected.

Checklist

- [ ] Checked in dark mode
- [ ] Checked in mobile
- [ ] Checked in IE11 and Firefox
- [ ] Props have proper autodocs
- [ ] Added documentation examples

  • Added or updated jest tests
    - [ ] Checked for breaking changes and labeled appropriately
    - [ ] Checked for accessibility including keyboard-only and screenreader modes
    - [ ] A changelog entry exists and is marked appropriately

Copy link
Copy Markdown
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

LGTM!

@chandlerprall chandlerprall merged commit 54a7510 into elastic:master Aug 23, 2019
@chandlerprall chandlerprall deleted the bug/1999-flaky-unit-test branch August 23, 2019 16:04
thompsongl pushed a commit to thompsongl/eui that referenced this pull request Sep 10, 2019
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.

Flaky test: EuiGlobalToastList lifetime elapse

2 participants