-
-
Notifications
You must be signed in to change notification settings - Fork 743
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 Raster DEM source serialization #2895
Conversation
minzoom: 2, | ||
maxzoom: 10 | ||
}); | ||
expect(source.serialize()).toStrictEqual({ |
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.
The regular toEqual() assertion doesn't fail on properties that are unexpectedly present but undefined, whereas toStrictEqual() does
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2895 +/- ##
==========================================
+ Coverage 74.48% 74.49% +0.01%
==========================================
Files 238 238
Lines 19002 19018 +16
Branches 4284 4285 +1
==========================================
+ Hits 14153 14167 +14
- Misses 4849 4851 +2
☔ View full report in Codecov by Sentry. |
Thanks! Please add a changelog entry. |
Entry added! |
Closes #2889.
While investigating the issue, I determined that not only are undefined properties included when serializing, but not all relevant properties are included either (e.g. minzoom and maxzoom). However, I can see no reason to not just use the base class RasterTileSource's serialize() function directly. So, I've removed the function from RasterDEMTileSource, and added a test for both RasterTileSource and RasterDEMTileSource.
Launch Checklist
CHANGELOG.md
under the## main
section.