Pounce Atlas is an open-source explorer for geographic datasets. It runs as a static web app built with Three.js and TypeScript. Its data handling is covered by a Node test file with 21 test cases. This post lists what those tests check, and what they do not prove.
Disclosure: AI assisted with drafting this post. Pounce reviewed it against the public source. The examples are fictional.
How the tests run
The project uses Node's built-in test runner. npm test runs node --experimental-strip-types --test tests/*.test.ts, so the model tests need no separate test framework.
What they check
Validation. Bundled examples must validate as independent datasets. Invalid coordinates are rejected, including a latitude of 91, a boolean latitude, and coordinates supplied on only one side. A duplicate public ID fails before a dataset replaces the current one. An unsupported schema version or a missing name fails.
Private fields. Extra fields such as email or phone are stripped during validation.
Unsafe input. Website values with unsafe schemes, such as javascript: or data:, are rejected, and so are URLs with embedded credentials.
Dates. Impossible calendar dates and malformed date strings fail. A future event must carry an announced status rather than occurred. Date stepping is tested to stay stable across month and year boundaries.
Map rules. A province-only point is not drawn as an exact location. A record without coordinates stays usable in the Industries and list views. An exact map cluster never includes places with similar names.
Activity. Activity date filters are inclusive. Records without events are not counted in activity totals.
CSV import. The parser handles quoted commas, escaped quotes and newlines. It flags an unterminated quote, a duplicate header and a ragged row. CSV imports do not invent coordinates or events.
Local file safety. Imported file content is treated as text and is not evaluated. One test feeds in an HTML image tag with an onerror handler and checks that it stays plain text.
Share links. Share state round-trips Unicode filters and selections without including a data payload.
What the tests do not prove
They check code paths. They do not show that any external dataset is complete, that a record's address is correct, or that an announced event later happened. The methodology explains what the app can and cannot claim: https://github.com/zaiqltd/pounce-atlas/blob/main/docs/METHODOLOGY.md
Test source: https://github.com/zaiqltd/pounce-atlas/blob/main/tests/model.test.ts
Demo with fictional data: https://pounce.co.za/atlas/
Code licence: MIT.
Top comments (0)