in src/directLine.mock.ts [213:227]
constructor(url: string, protocols?: string | string[]) {
server.scheduler.schedule(() => {
this.readyState = WebSocket.CONNECTING;
server.conversation.sockets.add(this);
this.onopen(new Event('open'));
this.readyState = WebSocket.OPEN;
const uri = new URL(url);
const watermark = uri.searchParams.get(keyWatermark)
if (watermark !== null) {
const start = Number.parseInt(watermark, 10);
this.play(start, server.conversation.history.length);
}
});
}