Skip to content

Conversation

@kettanaito
Copy link
Member

@kettanaito kettanaito commented Aug 13, 2025

Motivation

There's something clearly off with how the WebSocketServer utility integrates with the Playwright tests:

    FastifyError: Fastify has already been closed and cannot be reopened

       at ../support/WebSocketServer.ts:42

      40 |
      41 |   public async listen(port = 0): Promise<void> {
    > 42 |     const address = await this.app.listen({
         |                                    ^
      43 |       host: '127.0.0.1',
      44 |       port,
      45 |     })

To make sure that the server is managed properly, I'm moving it to a fixture. I hope this helps in preventing Fastify from failing here.

@kettanaito kettanaito merged commit 0735456 into main Aug 13, 2025
27 checks passed
@kettanaito kettanaito deleted the chore/flaky-ws branch August 13, 2025 19:13
@kettanaito
Copy link
Member Author

Released: v2.10.5 🎉

This has been released in v2.10.5!

Make sure to always update to the latest version (npm i msw@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants