chore: do not read browserslist file (#23127)

Fixes https://github.com/microsoft/playwright/issues/23125
This commit is contained in:
Max Schmitt 2023-05-18 18:11:08 +02:00 committed by GitHub
parent 595c4cb855
commit 0c032eb7be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View File

@ -76,6 +76,7 @@ function babelTransformOptions(isTypeScript: boolean, isModule: boolean, plugins
}
return {
browserslistConfigFile: false,
babelrc: false,
configFile: false,
assumptions: {

View File

@ -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);
});