Romain Bertrand

Results 12 comments of Romain Bertrand

Hi @johanlajili ! That’s expected, the server socket is indeed closed after an error. You’ll have to instantiate a new WS object before your `advanceTimersByTime` call. That behaviour is as...

Hi @johanlajili ! Sorry for the super late answer. After thinking about this some more, I think you're right. We could add a `autoRestart` config option to the `WS` constructor...

Hi @kheyse-oqton ! That's a good idea :slightly_smiling_face: Is that something you'd be willing to send a PR for? It could be a new `.toReceiveMessageMatching` matcher, that behaves like `.toMatchObject`...

Hi @antoinetissier ! You can already do this with ```js expect(await ws.nextMessage).toMatchSnapshot() ``` I don’t think it would be particularly useful to provide a wrapper around that.

Hi @slatifi ! Optional chaining was added in node 14 - are you able to upgrade your project to node 14 or later? (The previous version, 12, will reach end...

@slatifi sorry for the delay. Can you confirm this is still happening for you?

Hi @matiasgarcia ! Thanks for reporting this! Good catch, it looks we're not cleaning up that timeout... Would you be open to sending a PR for this? I think the...

Hi @Coteh ! Thanks for the feedback, that's a good point! I'm totally up for implementing something like that, but I'm afraid that the best solution would be a breaking...

Yup, that sounds good 👍 What would also be useful when we hit the timeout, would be to show all the messages we received since the `toReceiceMessage` call, something similar...