type MockCommand = (state: MockState, input: unknown) => MockState | void | Promise<MockState | void>; Runs a command with its wire input (undefined for a command without input) and returns the state changes it makes. A thrown error becomes a failed reply, an error with a kind (and reason) keeps them, and throw mockFailure(failure) replies with the declared failure (domain-failed).