test: do not pollute stderr with trace-viewer wsEndpoint (#21748)

This commit is contained in:
Max Schmitt 2023-03-17 16:15:20 +01:00 committed by GitHub
parent 4a66cca124
commit 53d341be01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -99,7 +99,7 @@ export async function showTraceViewer(traceUrls: string[], browserName: string,
await context.extendInjectedScript(consoleApiSource.source);
const [page] = context.pages();
if (isUnderTest())
if (process.env.PWTEST_PRINT_WS_ENDPOINT)
process.stderr.write('DevTools listening on: ' + context._browser.options.wsEndpoint + '\n');
if (traceViewerBrowser === 'chromium')

View File

@ -82,6 +82,7 @@ export const test = base
PWTEST_UNDER_TEST: '1',
PWTEST_CACHE_DIR: cacheDir,
PWTEST_HEADED_FOR_TEST: headless ? '0' : '1',
PWTEST_PRINT_WS_ENDPOINT: '1',
},
cwd: options.cwd ? path.resolve(baseDir, options.cwd) : baseDir,
});