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). |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| driver-client.js | ||
| electron-app.js | ||
| esm-playwright-chromium.mjs | ||
| esm-playwright-firefox.mjs | ||
| esm-playwright-test.mjs | ||
| esm-playwright-webkit.mjs | ||
| esm-playwright.mjs | ||
| esm.mjs | ||
| inspector-custom-executable.js | ||
| installation-tests.sh | ||
| read-json-report.js | ||
| README.md | ||
| sample.spec.js | ||
| sanity-electron.js | ||
| sanity.js | ||
| screencast.js | ||
| validate-dependencies-skip-executable-path.js | ||
| validate-dependencies.js | ||
Installation Tests
File installation-tests.sh tests that installation flow for all
Playwright packages works as expected.