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

Fix broken tests caused by adding IndexedDB support #3242

Merged
merged 1 commit into from Feb 17, 2017

Conversation

@Kegsay
Copy link
Contributor

Kegsay commented Feb 17, 2017

This test assumed that /sync would be called immediately after rendering
<MatrixChat /> but this isn't true in an IndexedDB world: it bounces via
store.startup() first.

It looks like the tests resolve this by adding q.delay(1) so that's what
I've done: in the future it would be better to extend HttpBackend to have
a waitFor(req) Promise function so we can removing timing from the tests.

This test assumed that `/sync` would be called immediately after rendering
`<MatrixChat />` but this isn't true in an IndexedDB world: it bounces via
`store.startup()` first.

It looks like the tests resolve this by adding `q.delay(1)` so that's what
I've done: in the future it would be better to extend `HttpBackend` to have
a `waitFor(req) Promise` function so we can removing timing from the tests.
@Kegsay Kegsay added the bug label Feb 17, 2017
Copy link
Member

richvdh left a comment

in the future it would be better to extend HttpBackend to have
a waitFor(req) Promise function so we can removing timing from the tests.

yup, fully agreed. If this fixes the tests, I'm happy

@Kegsay Kegsay merged commit 5c20499 into develop Feb 17, 2017
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.