mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-07 11:46:42 +03:00
fix(esm): silence warning when running with experimental loader (#17493)
Unfortunately, this silences all warnings, not just the experimental loader warning.
This commit is contained in:
parent
26150b7064
commit
da7feb9cc6
@ -315,7 +315,7 @@ function restartWithExperimentalTsEsm(configFile: string | null): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function experimentalLoaderOption() {
|
export function experimentalLoaderOption() {
|
||||||
return ` --experimental-loader=${url.pathToFileURL(require.resolve('@playwright/test/lib/experimentalLoader')).toString()}`;
|
return ` --no-warnings --experimental-loader=${url.pathToFileURL(require.resolve('@playwright/test/lib/experimentalLoader')).toString()}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function envWithoutExperimentalLoaderOptions(): NodeJS.ProcessEnv {
|
export function envWithoutExperimentalLoaderOptions(): NodeJS.ProcessEnv {
|
||||||
|
@ -245,6 +245,7 @@ test('should load ts from esm when package.json has type module', async ({ runIn
|
|||||||
|
|
||||||
expect(result.exitCode).toBe(0);
|
expect(result.exitCode).toBe(0);
|
||||||
expect(result.passed).toBe(1);
|
expect(result.passed).toBe(1);
|
||||||
|
expect(result.output).not.toContain(`is an experimental feature`);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('should filter stack trace for simple expect', async ({ runInlineTest }) => {
|
test('should filter stack trace for simple expect', async ({ runInlineTest }) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user