-
Notifications
You must be signed in to change notification settings - Fork 6
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
Create map-utils.unit.test.js #956
base: develop
Are you sure you want to change the base?
Conversation
that actually tests the calculation using a simple example. Goal is to detect regressions caused by updating the turf.js version closes #769
Acutally wanted to
but found it out of scope. All call sites I looked at where not properly typed, and the tests where still js files. |
Codecov Report
@@ Coverage Diff @@
## develop #956 +/- ##
===========================================
- Coverage 36.49% 36.41% -0.08%
===========================================
Files 499 466 -33
Lines 9425 9149 -276
Branches 1932 2002 +70
===========================================
- Hits 3440 3332 -108
+ Misses 5699 5368 -331
- Partials 286 449 +163
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
and fix linting errors. Directly editing via github webapp since fail to properly set it up locally for now (might be a webstorm thing)
To test the test, enter the following geoJSON into https://geojson.io/ {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"geometry": {
"type": "LineString",
"coordinates": [
[0, 0],
[0, 5],
[10, 5],
[10, 10]
]
}
}]
}
|
Sorry for letting this PR rot, still figuring out why |
@tordans Not sure what to do here. Along seems to produce results close to what we should expect, but not exactly. What I could do is to adapt test data once more so that lines with a smaller bounding box are fed into the test, since we are not interested in the util to work for large scale denominators. |
Well I think that's a problem of turfjs itself, see Turfjs/turf#1362 Even in their official docs the function does obviously not work :D |
Maybe it's fixed in the newest version 6.5.0 , since we didn't used it yet. I've updated it in #1012 |
Alright, will try to sync the branch and re-run tests throughout the week |
Actually the backport from develop didn't solve the problem :/ So this needs some more investigation. |
that actually tests the calculation using a simple example. Goal is to detect regressions caused by updating the turf.js version
closes #769
Checklist: