mock-chronik-client supports websocket sub and unsub methods to support some test cases. Note that mock-chronik-client does not support all websocket features of chronik-client. It is mostly an elaborate stub so we can test things like "the function subscribes as expected."
It's important to match all the methods though so that the Classes (MockChronikClient and ChronikClient) are interchangeable in unit tests.