Testing
Three packages publish a /testing entry with test doubles. None depends on a test runner: pass vi.fn or jest.fn where a spy is needed.
A test with no WebGL cannot mount a real map. createMapClientStub is a complete MapClient that does nothing:
createMapClientSpy wraps every method with your spy, so you can assert which commands ran:
A viewer is a session, a cache is the host's query layer, and a bus is the thing under test:
The builders return complete records, so a test names only the fields it cares about:
useStudioViewer and useStudioHostRegistry throw outside a studio host, so a component test supplies the context:
A component that reads the API throws outside a MountayaProvider. WithMountayaClient answers its requests from a table you pass, so no request leaves the machine: