mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00

There are 3 ways to import `@playwright/test` library in the modern Node.js ecosystem: - Using `require`: works great, this patch doesn't change it - Using `import` statement from `.mjs` file - we have wrong `default` for @playwright/test that should be a `test`. This is what test checks for - Using `import test from '@playwright/test'` from `.ts` file - was broken because TypeScript thought it's a CJS module, whereas it's a ESM module in reality. Also, typescript types import from `.d.ts` file was broken because we had no default export (`export *` syntax does not export default).
Installation Tests
File installation-tests.sh
tests that installation flow for all
Playwright packages works as expected.