Update test case polygons so some should fail when lat / long is used…#4608
Update test case polygons so some should fail when lat / long is used…#4608JacobJT wants to merge 1 commit into
Conversation
|
This PR updates some of the Polygons used in the test spec, which should trigger tests to fail. Polygons were almost all squares that were mirrored over an x=y line, so it did not expose issues where the lat/long values either were or were not swapped appropriately. |
| }); | ||
|
|
||
| it('polygonContain query', (done) => { | ||
| const points1 = [[0,0],[0,1],[1,1],[1,0]]; |
There was a problem hiding this comment.
This is the most important change. If the coordinates of either the polygon or the coordinate we are seeing if is contained within the polygon are reversed from what we intend, the check will fail. To be frank, many of the other changes may be completely moot, as they seem to be just validating data that exists and doesn't criss / cross. In all likelihood, everything but this line change could be scrapped to highlight the same results
|
The appropriate test was moved to #4609 |
Ports spec/ParsePolygon.spec.js to REST-based specs under spec/rest/objects/: - polygon.spec.ts: object lifecycle, equalTo, and validation - polygon-query.spec.ts: $geoIntersects point-in-polygon queries (parse-community#4608) - polygon-mongo.spec.ts: MongoDB storage format and 2d/2dsphere indexes Adds polygon/geoIntersects builders to spec/helpers/geo.ts and a describe_only_db ambient declaration. No Parse JS SDK; the storage spec uses the database adapter directly only where there is no REST surface.
… improperly