-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Question]: is playwright test runner suitable for unit tests? #8076
Comments
It depends how much features you need for your unit tests. The Playwright test-runner does currently not yet provide jsx/custom babel support, see #7121. Basic unit tests of Node.js application are working with Playwright and external libraries can be imported. |
That's a fair answer since I was not objective about my requirements. To the topic you pointed, I don't use typescript and was able to set up Jest to conform to es6 syntax making all my front-end code and tests follow the same flavor. I understand that is not possible right now with Playwright. But I think I'm in search of some sort of high-level comparison (maybe a post known by the project's members) in the realm of unit testing with both runners or some general advice from someone smarter than me that contemplated this challenge. Thank you @mxschmitt |
Awesome, talking about unit tests, I'm using it for a private project. So I have e.g. normal end-to-end projects for which I have three projects in the config (chromium, webkit, firefox) and then I have another project, which I use for unit tests. Inside this unit tests project, I'm not using the page or context fixtures and by that the browsers do not get started. (ref) Stay healthy too! |
That's very useful. Tks again @mxschmitt :) |
Your question
I love to write and run all my unit and Playwright e2e tests using jest in my projects. Syntax, configuration, assertions, scripts, and so on share an underline platform. Time writing code is maximized.
I recently watched Andrey Lushnikov Applitools speak about Playwright test runner. The tool is awesome and the benefits for e2e testing are obvious.
Now, at the point of starting a new project, I am wondering if I could/should write all project tests, including unit tests, with playwright test runner.
The text was updated successfully, but these errors were encountered: