Expand description
Helpers for testing an app on Zero without a server or a real clock
(ZeroTesting in the Swift client): a clock that only moves when told
to, in-memory sockets a test plays the server on, and a log sink that
keeps what was logged.
Structs§
- Manual
Scheduler - A clock that only moves when told to, like fake timers in JS tests.
- Mock
Socket - A socket the test drives: it records what the client sends and delivers what the test receives on the server’s behalf.
- Mock
Socket Factory - Opens in-memory sockets and keeps every one, in opening order, so a test
can play the server (
MockSocketinpackages/zero-client/src/client/test-utils.ts). - Recording
LogSink - Keeps every message logged, with its level.