test: expand coverage for fonts, vector tiles, raster tiles, and style URLs - #2253
Open
navidnabavi wants to merge 3 commits into
Open
test: expand coverage for fonts, vector tiles, raster tiles, and style URLs#2253navidnabavi wants to merge 3 commits into
navidnabavi wants to merge 3 commits into
Conversation
Add dedicated test/font.js covering /fonts.json listing, PBF content, Last-Modified header, 304/no-cache caching behavior, and 400 error cases. Expand test/tiles_data.js with GeoJSON format endpoint, TileJSON content and absolute URL validation, and invalid format rejection. Expand test/tiles_rendered.js with HTTP caching tests: Last-Modified header presence, 304 Not Modified, Cache-Control: no-cache bypass, and stale If-Modified-Since handling. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ON tests Add test/style_urls.js covering: - Sprite and glyphs URLs rewritten to absolute on style.json response - Source tile URLs rewritten to absolute - /styles.json items have absolute url field and list all configured styles - Rendered TileJSON default tileSize (256) and explicit tileSize (512) - /rendered.json and /data.json items have absolute tile URLs - /health returns "OK" body Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Fix prettier formatting across tiles_data.js, tiles_rendered.js, font.js, and style_urls.js. Replace chained .not.be.NaN expression with Number.isNaN() call to satisfy no-unused-expressions rule. Remove unused `names` variable in style_urls.js. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test/font.js: dedicated font endpoint tests covering/fonts.jsonlisting, PBF content/body,Last-Modifiedheader,304 Not Modified+Cache-Control: no-cachebypass, and all 400 error casestest/tiles_data.js: GeoJSON format endpoint, TileJSON content + absolute URL validation, invalid format rejectiontest/tiles_rendered.js: HTTP caching (Last-Modifiedheader,304,no-cachebypass, stale date handling)test/style_urls.js: style URL rewriting (sprite, glyphs, source URLs become absolute),/styles.jsonlisting content, rendered TileJSONtileSizefield (256 default + 512 explicit), listing endpoints (/rendered.json,/data.json) item content,/healthbodyCoverage delta
serve_font.jsserve_data.jsserve_rendered.jsserver.jsTest plan
npm test)static-bearing-pitchfixture)