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

Remove inconsequential calls to fetchSession() #39

Merged
merged 4 commits into from
Dec 4, 2019
Merged

Remove inconsequential calls to fetchSession() #39

merged 4 commits into from
Dec 4, 2019

Conversation

assemblethis
Copy link
Collaborator

This is a PR for the issue I raised in #34. In the sync, pull, push, and changes functions, there is a call to fetchSession() that returns a promise but nothing is being done with the returned promise. The fetchSession() method doesn't seem to have any side effects that would be useful after the sync, pull, push, or changes calls on the db. It seems to be inconsequential code, so I suggest removing it with this PR.

a call to fetchSession returns a promise but nothing is being done with the returned promise and the fetchSession method doesn't seem to have any side effects that would be useful after the sync, pull, push, or changes calls on the db.
@assemblethis assemblethis requested a review from MDSLKTR December 3, 2019 04:44
was failing if the event 'pouchdb-livefeed-error' hadn't yet been emitted. So we wait until the nextTick and then we can ensure we're not missing any events.
 assumes we're using pouchdb-authentication, will cause error if we're not. see issue #33
@MDSLKTR
Copy link
Owner

MDSLKTR commented Dec 4, 2019

@assemblethis This is looking good and removes some rather useless calls which should make it a bit lighter on the network in general, feel free to merge when you're done. Thanks!

@assemblethis
Copy link
Collaborator Author

Thanks, maybe we should release a version 0.3.5 in a little bit. Let me run this latest through a few more manual tests though.

@assemblethis
Copy link
Collaborator Author

assemblethis commented Dec 4, 2019

All unit tests passed:

PASS tests/testData.spec.js
Pouch options are returned by function
Unit Tests that todos is defined on Vue components
V Test Plugin with Empty Data Function (15ms)
V Test Plugin with Empty Data Object (11ms)
V Test Plugin with No Data Function Or Object (1ms)
V Test Plugin with Existing Data Function (2ms)
Unit Tests to see that the todos property on the data root level is connecte
d with the todos property on the vue instance (this is what the beforeCreate lif
ecycle hook does)
V Test Plugin with Empty Data Function (2ms)
V Test Plugin with Empty Data Object (1ms)
V Test Plugin with No Data Function Or Object (2ms)
V Test Plugin with Existing Data Function (1ms)
Pouch options are objects
Unit Tests that todos is defined on Vue components
V Test Plugin with Empty Data Function (1ms)
V Test Plugin with Empty Data Object (2ms)
V Test Plugin with No Data Function Or Object (2ms)
V Test Plugin with Existing Data Function (2ms)
Unit Tests to see that the todos property on the data root level is connecte
d with the todos property on the vue instance (this is what the beforeCreate lif
ecycle hook does)
V Test Plugin with Empty Data Function (2ms)
V Test Plugin with Empty Data Object (2ms)
V Test Plugin with No Data Function Or Object (6ms)
V Test Plugin with Existing Data Function (1ms)
Set selector to null
V Test Plugin with Reactive Selector that can return null (2ms)

And manual tests too

@assemblethis assemblethis merged commit ad2618f into MDSLKTR:master Dec 4, 2019
@MDSLKTR
Copy link
Owner

MDSLKTR commented Dec 5, 2019

Published to npm as pouch-vue 0.3.5, thanks @assemblethis

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

Successfully merging this pull request may close these issues.

2 participants