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 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.
Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

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
@t3chguy t3chguy deleted the kegan/fix-tests-for-indexeddb branch May 12, 2022 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants