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

Replace setTimeout in tests by waiting for events #44

Open
sweh opened this issue Jan 8, 2016 · 0 comments
Open

Replace setTimeout in tests by waiting for events #44

sweh opened this issue Jan 8, 2016 · 0 comments

Comments

@sweh
Copy link
Owner

sweh commented Jan 8, 2016

Originally reported by: Florian Pilz (Bitbucket: florianpilz, GitHub: florianpilz)


Due to changing to a new version of Jasmine we had to rewrite all async tests. To get back to a green bar we took the shortcut and often replaced runs and waitsFor with stupid setTimeout blocks that will wait for 100ms rather waiting at most 100ms. This slows down 30% of all tests.

To speed up tests again, we should try to replace those blocks with proper event handlers, i.e. expect and done are called inside an event handler that waits for the previous action to be completed. It might be required to inject more events for testing.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant