Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

eventBus: mock uses wrong promise implementation #18

Closed
alex3683 opened this issue Nov 9, 2015 · 1 comment
Closed

eventBus: mock uses wrong promise implementation #18

alex3683 opened this issue Nov 9, 2015 · 1 comment

Comments

@alex3683
Copy link
Member

alex3683 commented Nov 9, 2015

Currently the event bus mock is initialized with a window.Promise based wrapper, which is compatible to $q. This makes all promises of the event bus asynchronous and by that the tests will be evaluated before the promises are resolved. Hence those tests will likely fail.
Instead (for now) the real $q should be used. This is properly mocked by angular and will be flushed on every $digest cycle. The only smell introduced with that approach is, that non-angular widgets will depend on a $digest. This is okay for now, since LaxarJS < 2.0 is still built upon AngularJS.

@alex3683
Copy link
Member Author

alex3683 commented Nov 9, 2015

Fixed on master (v1.0.0) and release-0.6.x (v0.6.1).

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

No branches or pull requests

1 participant