Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: do not read browserslist file (#23127)
Max Schmitt0c032eb7be7d
diff --git a/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts b/packages/playwright-test/bundles/babel/src/babelBundleImpl.tsindex 0f4ab2979b..2a9b246248 100644--- a/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts+++ b/packages/playwright-test/bundles/babel/src/babelBundleImpl.ts@@ -76,6 +76,7 @@ function babelTransformOptions(isTypeScript: boolean, isModule: boolean, plugins}return {+ browserslistConfigFile: false,babelrc: false,configFile: false,assumptions: {diff --git a/tests/playwright-test/babel.spec.ts b/tests/playwright-test/babel.spec.tsindex e99a790a41..bd932c7601 100644--- a/tests/playwright-test/babel.spec.ts+++ b/tests/playwright-test/babel.spec.ts@@ -117,3 +117,17 @@ test('should work with |const| Type Parameters', async ({ runInlineTest }) => {expect(result.passed).toBe(1);expect(result.output).toContain('names: Alice, Bob, Eve');});++test('should not read browserslist file', async ({ runInlineTest }) => {+ test.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/23125' });+ const result = await runInlineTest({+ 'package.json': `{ "browserslist": ["some invalid! value :)"] }`,+ 'one-success.spec.ts': `+ import { test, expect } from '@playwright/test';+ test('succeeds', () => {});+ `+ });+ expect(result.exitCode).toBe(0);+ expect(result.passed).toBe(1);+ expect(result.failed).toBe(0);+});