const errorEvent = new Event('error')
Object.defineProperty(errorEvent, 'cause', {
enumerable: true,
configurable: false,
value: reason,
})
this.data.connection.client.socket.dispatchEvent(errorEvent)
Using this in MSW to simulate client errors. Not very nice.
Using this in MSW to simulate client errors. Not very nice.