Conformance fixtures
The conformance fixtures are language-agnostic test cases. Every Sightmap SDK port is expected to pass them. They live under conformance/ in the spec repo.
Layout
Section titled “Layout”Each fixture is a numbered directory containing:
sightmap/— input YAML files (the simulated.sightmap/directory)expected.json— list of{ command, args, expected }test cases the runner checks
The runner asserts that every key in expected is present in the actual output and matches deeply. Extra keys in the actual output are allowed, so the suite is forward-compatible. For arrays in expected, the actual array must be at least as long, and the prefix must match.
Running locally
Section titled “Running locally”Clone the spec repo, then point the official CLI at the conformance/ directory:
git clone https://github.com/sightmap/spec.gitcd specpnpx @sightmap/sightmap validate conformanceThe @sightmap/sightmap package vendors the runner and reports per-fixture pass/fail. See @sightmap/sightmap on npm.
Current fixtures
Section titled “Current fixtures”| # | Name | Exercises |
|---|---|---|
| 001 | minimal | Smallest valid sightmap; basic match |
| 002 | multi-file-merge | Same view name across two files → merge-collision-view warning |
| 003 | route-precedence | First-match-wins on * vs ** vs literal |
| 004 | param-normalization | Express-style :param normalizes to * |
| 005 | selector-array | selector accepts array; alternates tried in order |
| 006 | view-scoped-vs-global | Global components match everywhere; scoped only on their view |
| 007 | request-method-filter | match filters requests by HTTP method |
A second series (100-fmt-*) covers formatter behavior — quoting, key order, list sort, comment and header preservation, idempotence, and leaving invalid input untouched.
Contributing a new fixture
Section titled “Contributing a new fixture”- Create the next-numbered directory under
conformance/. - Author
sightmap/*.yamlandexpected.json. Keep each fixture focused on one behavior. - Run the conformance runner from any SDK to verify it passes.
- Open a PR. Sign off your commits with
-sper the Contributing guide.
Consumers
Section titled “Consumers”@sightmap/sightmap— clones this repo at a pinned SHA and runs the fixtures in CI.- Future ports (
sightmap-python,sightmap-go) will run the same fixtures via a port-specific runner.