-
Playwright
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
For your question, it does actually not spin up a browser if you do not use page or browser in your test cases! And I wrote the blog post exactly because I think many people don't even consider to use it for unit tests, but I think it can be a viable test runner for that kind of scenarios! And just to be clear, before I released the blog post I asked the folks behind Playwright what they say about using Playwright for unit tests, and they are very supportive of that idea: https://github.com/microsoft/playwright/issues/14268
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
The "pros" stated in the blog post compare Playwright Test with Jest/Mocha. vitest is a very interesting, modern test framework and shares some of the pros, like TS OOTB support (as you mentioned) and it also has no globals. Still, some of the pros like "Same tool for E2E tests and unit tests" still hold only for Playwright.
-
And honestly, I had a couple of troubles with it. Like: TS is not supported out-of-the-box, so you have to configure ts-jest or something do get it even running; then, path aliases still don't work, so you have to apply some additional setup (like pathsToModuleNameMapper from ts-jest). Then I added Cypress for E2E tests and suddenly, nothing would compile because both Jest and Cypress define global typings, which conflict with each other... And at the end of the day, Jest had memory leaks such that the CI/CD system would sometimes error because of OOM issues (see e.g. https://github.com/facebook/jest/issues/11956 with 69 comments at the time of writing).