test(tilemap): close infinite-maps deferred batch — Tiled provider tests, destroy race, misaligned-chunk guard, infinite .tmj demo, hygiene#383
Merged
Conversation
added 8 commits
July 16, 2026 18:22
…l. negative coordinates Extends the Slice-3 infinite-map suite with an end-to-end test that drives TiledMap.toTileMap() -> getChunkSource() -> a real ChunkStreamer, asserting resolved tiles at both negative and positive tile coordinates re-sliced from 16x16 on-disk Tiled chunks onto the runtime 32x32 grid. Also strengthens the existing bounded/unbounded assertions: an infinite layer's width/height are asserted undefined, and a finite layer's bounded/width/height are asserted explicitly alongside its already-covered getChunkSource() === undefined.
…f silently corrupting indices
…unkSource) Add drift-fields.tmj, a hand-authored infinite Tiled map (two chunked tile layers, 16x16 on-disk chunks including negative coordinates) and the tiled-infinite-map example: TiledMap.toTileMap() + getChunkSource() feed one ChunkStreamer per layer around a free-flying WASD camera, with no procedural sampler involved. Wire the example into the catalog and into the "Streaming a Tiled infinite map" guide section.
Extend the Node/config-files/scripts eslint block to glob scripts/**/*.mjs alongside scripts/**/*.ts, so the 5 .mjs scripts stop crashing the linter on the first type-aware rule. Add a scoped globals.browser override for webgpu-probe.mjs, whose page.evaluate() callbacks execute in the browser page rather than the Node process. Drop one dead assignment in generate-demo-audio-loops.mjs surfaced by the now-working lint pass.
Whole-object toEqual(areas) assertions required editing every call site whenever a new lane area was added. Switch them to toMatchObject so each scenario still pins its known area values explicitly, but a future area addition doesn't retroactively fail unrelated scenarios. Verified by temporarily adding a 5th boolean area to selectAreas()'s return value: all 28 existing tests still passed before reverting the experiment.
sync-example-capabilities.ts listed webWorkers in its ordering array but had no derivation rule, so worker-based examples were only ever tagged with the input capabilities they also happened to use. Add a rule: source matching createWorkerSampledChunkSource( or new Worker( implies webWorkers. Re-running the sync adds webWorkers to worker-streamed-terrain only; no other catalog entry changes.
Prettier flagged test/ci/select-lanes.test.ts (unwrapped toMatchObject call) from the select-lanes lane-addition-proof commit.
Exoridus
enabled auto-merge (squash)
July 16, 2026 19:41
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Bundle ReportChanges will increase total bundle size by 968 bytes (0.0%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: exojs-tiled-esmAssets Changed:
Files in
view changes for bundle: exo-full-iife-Exo-iifeAssets Changed:
Files in
|
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
Closes the deferred items accumulated across Infinite Maps Slices 2–4c. Companion to #382 (engine heal fix, already merged).
toTileMap()→getChunkSource()→ realChunkStreamer→getTileAt, with a distinct-gid fixture asserting negative AND positive coordinates, plus bounded/unbounded contract assertions both directions.packages/exojs-tiled, only src change): an infinite-map chunk whose x/y is not grid-aligned now throws aTiledFormatErrornaming layer and coords attoTileMap()time, instead of silently corrupting tile indices. TDD, negative-coordinate modulo verified..tmjplayground demo: hand-authoreddrift-fields.tmj(14 aligned 16×16 chunks incl. negatives, embedded map-pack tileset) +tiled-infinite-mapexample streaming both layers, wired into the infinite-maps guide chapter. Smoke + screenshot verified.scripts/**/*.mjsfinally lintable (5 never-linted files, mechanical fixes only);select-lanes.test.tsconverted totoMatchObjectwith explicit per-area flags (lane additions no longer break 15 call sites, discrimination retained);sync-example-capabilitiesgains the missingwebWorkersderivation rule.Verification
Full gates +
pnpm test(7721 passed), root build + site build, smoke + screenshot of the new example (coherent island, real tile art). Whole-branch review: cross-task interlocks verified (guard inert against all branch fixtures, capability manifest idempotent under fresh sync).