-
-
Notifications
You must be signed in to change notification settings - Fork 73
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 expression tests #476
Add expression tests #476
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #476 +/- ##
===========================================
+ Coverage 78.06% 92.09% +14.03%
===========================================
Files 101 100 -1
Lines 4149 4176 +27
Branches 1185 1197 +12
===========================================
+ Hits 3239 3846 +607
+ Misses 910 330 -580 ☔ View full report in Codecov by Sentry. |
When reviewing, the only interesting files are the non json files, mainly: |
I didn't know the MapLibre GL JS expression parser lives in this repo.
This sounds bad, and the solution to move the tests here sounds like a good fix, but maybe we should also think about the architecture supporting parity between GL JS and Native a bit more. For example, should the expression related code from MapLibre Native also move to this repo? I don't think that is desirable. A monorepo would be a pretty clean solution, but GitHub does not support it well (the issues and PRs are not separated enough and a single repo has only a single landing page). We are running into that with Native, where developers with vastly different backgrounds are put off by the C++ monster lurking beneath the Android / Qt / iOS platform interfaces that they are familiar with. Just thinking out loud, but maybe manually copying these tests over to the Native repo (as we do right now) is an OK solution for now... It is better than moving C++ code out of the Native repo in here or having to open two PRs for a single fix. |
This is a big question which we have yet to find a good solution for. |
regarding parity between gl js / native, it's still not super clear for me what to do with the .ts code, but moving the json expression tests as done in this PR seems like a natural step in the right direction - and a bit closer to having native also consuming them from here instead of holding a copy. |
Also @louwers the coverage here is now 92%, I'm totally kicking your butt :-P |
Launch Checklist
Resolves #95
This adds the expression tests to this repo, as the code related to their functionality is also here.
I've also made some minor modification to the test execution code to be more readable.
After this is merged, I'll remove the tests and their files from the maplibre-gl-js repo.
The issue that prompted it is the following:
As when I tried to fix it I found out the code and the tests are residing in different repositories.
CHANGELOG.md
under the## main
section.