Skip to content

Replace setTimeout in tests by waiting for events #44

@sweh

Description

@sweh

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.


Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions