Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dev server when running tests #172

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

StefSchenkelaars
Copy link

Configured the playwright web server to boot the vite dev server.
This way the requests are automatically handled and doesn't have to be configures in the test files themselves.

Configured the playwright web server to boot the vite dev server.
This way the requests are automatically handled and doesn't have
to be configures in the test files themselves.
@oscartbeaumont
Copy link
Owner

Sorry for the delay in reviewing this PR.

I am not sure about merging this PR. I originally set up the test suite to use the compiled bundle as that's what you are going to be using in production and so it is much more important that the plugin works correctly in production than when using the dev server.

Given the global is not defined error only occurs when using the dev server (hence why the tests pass currently), it would make sense to add tests that use the dev server, however, I am not convinced moving them all of the tests to the dev server is a good idea, as this could cause a bug like this to get into production bundles.

I think the way forward is to set up Playwright to run the same tests against two environments, one being the production bundle and the other being the dev server. You could refactor this PR to make this change or close it and I can do this.

Thanks for your PR!

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