refactor(playwright): use msw playwright binding#131
Open
kleinfreund wants to merge 2 commits intomswjs:mainfrom
Open
refactor(playwright): use msw playwright binding#131kleinfreund wants to merge 2 commits intomswjs:mainfrom
kleinfreund wants to merge 2 commits intomswjs:mainfrom
Conversation
e424296 to
904ca8d
Compare
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
b39b4a7 to
a80b6a3
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/playwrightto the playwright example.Update playwright (and
@playwright/test) to avoid newTypeError: this[#page].routeWebSocket is not a functionerrors 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
testscript to runvitest runinstead ofvitestso it doesn't run in watch mode.Update the jest and jest-jsdom examples' jest configuration to transform the ESM-only
until-asyncpackage.