-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Add nearsphere convenience methods #582
Add nearsphere convenience methods #582
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the ‘fit’ issue do you think it would be nice / possible to have ‘sorted’ as an additional param instead of new functions altogether?
src/__tests__/ParseQuery-test.js
Outdated
@@ -616,6 +616,63 @@ describe('ParseQuery', () => { | |||
}); | |||
}); | |||
|
|||
fit('can generate near-geopoint queries without sorting', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, needs to replace by ‘it’
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Codecov Report
@@ Coverage Diff @@
## master #582 +/- ##
==========================================
+ Coverage 84.7% 84.71% +<.01%
==========================================
Files 48 48
Lines 4015 4017 +2
Branches 905 906 +1
==========================================
+ Hits 3401 3403 +2
Misses 614 614
Continue to review full report at Codecov.
|
@flovilmart good idea, introduced |
Ok, tests are failing for now as the feature require an unpublished version of parse-server |
I’ll do a release of the server later so we can get going with this one. |
@mtrezza I’m wondering, can we make those tests succeed without the new parse-server? This way, we’ll be able to ship in a single server release with the JS SDK? |
@flovilmart Yes, we could remove the tests against the query results (for now) in The query results are already tested in parse-community/parse-server#4825 so if the query syntax is correct and passes the tests, it should yield the same query results. The integration tests behave a bit like chicken-and-egg it seems. However, I think there should also be a test against query results of the convenience methods, so I'd add them ASAP later on. What do you suggest? |
We can do the integrations tests in parse server instead, for this one or mark them xit or pending / optional |
Yes, I already added the tests in parse server with parse-community/parse-server#4827. I was taking guidance from the existing tests, but now that you say it, some tests seem to be redundant because the integration tests are in the SDK and in parse server. Or is it best practice to test integration from both sides? |
…n of parse server will fail
@flovilmart done |
@flovilmart Can we do something similar to what we did with the PHP SDK and have it always go against the bleeding edge? |
@flovilmart Have you seen my last comment #582 (comment) What do you think about using the latest parse server for testing? |
We can definitely do that :) easier to catch regessions! |
What do I have to change in code?
… On 23.06.2018, at 18:30, Florent Vilmart ***@***.***> wrote:
We can definitely do that :) easier to catch regessions!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@mtrezza Change the version of parse server used for test to the latest. https://github.com/parse-community/Parse-SDK-JS/blob/master/integration/package.json#L6 to Then remove your Also I'm confused by change to the existing test cases if |
Change to the existing test cases was to make it apparent that there is a sorted parameter and to explicitly test with sorted=true. But it would surely be enough to have one case with sorted=true. So I’ll revert the existing test cases and add one for sorted=true.
… On 23.06.2018, at 19:41, Diamond Lewis ***@***.***> wrote:
@mtrezza You can start by changing the version of parse server used for test to the latest.
https://github.com/parse-community/Parse-SDK-JS/blob/master/integration/package.json#L6
to github:parse-community/parse-server#latest
Then remove your xit from test
Also I'm confused by change to the existing test cases if sorted is optional why are you forcing true? I feel like I'll have to change all my calls to sorted = true.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
That’s what I was going for. It looked like it was required |
…ivated integration tests for near-sphere
…case with sorted=true parameter
@dplewis Can you please have a look at the failing integration test, I think it is because parse-server#latest failed to build?
|
@flovilmart According to the docs I have to do It currently fails for me
using |
@flovilmart How does this look? On a side note should we pin the node packages? Don't want a repeat of parse-community/parse-server#2040 |
@dplewis see my comment. I’ll have a look tomorrow too |
@dplewis that sounds good! Thanks to this new NPM feature, one can use any branch and test against it. npm will fetch the dev deps and do it's thing! Wow :) |
@flovilmart thats pretty awesome now that I think about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent everything passes so let's merge it in!
@mtrezza Thanks again for the PR! |
@flovilmart Sure thing, thanks to you and dplewis for the support. |
Any time! |
Adding convenience methods for queries with
geoWithin.nearSphere
.Depending on parse-community/parse-server#4825