Search code examples
ts-jestplaywright

What are the pros and cons of Playwright-test VS jest-playwright-preset


If one were to start a brand new project and we want to use Playwright with TypeScript for front-end testing, would you recommend we use Playwright-test or Jest-Playwright-preset as the test runner? Please indicate why you would pick one over the other. Thank you!


Solution

  • I would recommend Playwright Test, because

    • it works without other external dependencies
    • has support for TypeScript out of the box
    • has multi-project support with different browser configurations
    • Supports trace-viewer, video, and screenshot creation out of the box via the config.
    • Applies context per test best practice to have them isolated and self contained

    For more references see here: https://playwright.dev/docs/test-intro