Skip to content

refactor(playwright): use msw playwright binding#131

Open
kleinfreund wants to merge 2 commits intomswjs:mainfrom
kleinfreund:refactor/use-msw-playwright-binding
Open

refactor(playwright): use msw playwright binding#131
kleinfreund wants to merge 2 commits intomswjs:mainfrom
kleinfreund:refactor/use-msw-playwright-binding

Conversation

@kleinfreund
Copy link

@kleinfreund kleinfreund commented Sep 11, 2025

In mswjs/playwright#21 (comment), I offered help with updating some msw examples and this is the first attempt at doing so.

Changes

Add @msw/playwright to the playwright example.

Update playwright (and @playwright/test) to avoid new TypeError: this[#page].routeWebSocket is not a function errors that started occurring after introducing @msw/playwright.

Set "type": "module" in the playwright example which became necessary with recent updates to @msw/playwright.

Update msw in all examples (except for the angular one which I couldn't figure out how to do). This became necessary due to a raised peer dependency on msw in the playwright example (I could've left the other msw versions alone but tried to keep them in sync as much as possible).

Change the vue example's test script to run vitest run instead of vitest so it doesn't run in watch mode.

Update the jest and jest-jsdom examples' jest configuration to transform the ESM-only until-async package.

@kleinfreund kleinfreund force-pushed the refactor/use-msw-playwright-binding branch from e424296 to 904ca8d Compare September 11, 2025 06:44
@kleinfreund kleinfreund marked this pull request as ready for review September 11, 2025 06:49
Add @msw/playwright to the playwright example.

Update Playwright to avoid TypeError: this[#page].routeWebSocket is not a function errors when using @msw/playwright.

Use the `@msw/playwright` binding
@kleinfreund kleinfreund force-pushed the refactor/use-msw-playwright-binding branch from b39b4a7 to a80b6a3 Compare September 17, 2025 09:33
Update `playwright`, `@playwright/test`, and `@msw/playwright` and update the network fixture setup accordingly. This also made it necessary to set `"type": "module"` in the playwright example.

Update msw in all examples (except for the angular example which I couldn't figure out how to update). This became necessary due to a raised peer dependency on msw specifically for the playwright example.

In order to keep the angular example's version of `msw` out-of-sync with the other examples while not causing

Change the vue example's `test` script to run `vitest run` instead of `vitest` so it doesn't run in watch mode.

Update the jest and jest-jsdom examples' jest configuration to transform the ESM-only `until-async` package.
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.

1 participant