The examples you provided in https://
The examples you provided in https://github.com/cloudflare/workers-sdk/tree/main/fixtures/vitest-pool-workers-examples are really useful!
I was in particular looking for a best practice example to test WebSockets. I was trying the following setup (which is roughly how it worked in Miniflare v2):
But when running those tests, I'm now getting the following error:
I've also tried closing the socket at the end of the test to see if it maybe the be cause of the error, but as soon as I call
ws.close()
, it even segfaults (see https://gist.github.com/nvie/85a9f9c33efe81db4b95c3288f507c3f#file-error-log-L3).
Would you be able to provide an example test to test a WebSocket connection in an integration test in the new Vitest + Miniflare v3 setup? 🙏2 Replies
Hey! 👋 I'll try put an example together, but that segfault is interesting. Would you be able to put together a minimal reproduction?
I can try doing that somewhere next week, as I suspect it's going to take me a bit of time to make this a minimal reproduction, as we're dealing with a quite complicated existing setup right now. Will get back to you later!