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:
Dmitry Gozman 2022-09-21 10:56:17 -07:00 committed by GitHub
parent 26150b7064
commit da7feb9cc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -315,7 +315,7 @@ function restartWithExperimentalTsEsm(configFile: string | null): boolean {
}
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 {

View File

@ -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.passed).toBe(1);
expect(result.output).not.toContain(`is an experimental feature`);
});
test('should filter stack trace for simple expect', async ({ runInlineTest }) => {