mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-27 21:58:52 +03:00
chore: hide watch mode, it is not ready (#20905)
This commit is contained in:
parent
798696a18a
commit
7f0763d789
@ -60,7 +60,6 @@ function addTestCommand(program: Command) {
|
||||
command.option('--project <project-name...>', `Only run tests from the specified list of projects (default: run all projects)`);
|
||||
command.option('--timeout <timeout>', `Specify test timeout threshold in milliseconds, zero for unlimited (default: ${defaultTimeout})`);
|
||||
command.option('--trace <mode>', `Force tracing mode, can be ${kTraceModes.map(mode => `"${mode}"`).join(', ')}`);
|
||||
command.option('--watch', `Run watch mode`);
|
||||
command.option('-u, --update-snapshots', `Update snapshots with actual results (default: only create missing snapshots)`);
|
||||
command.option('-x', `Stop after the first failure`);
|
||||
command.action(async (args, opts) => {
|
||||
@ -167,7 +166,7 @@ async function runTests(args: string[], opts: { [key: string]: any }) {
|
||||
config._internal.passWithNoTests = !!opts.passWithNoTests;
|
||||
|
||||
const runner = new Runner(config);
|
||||
const status = opts.watch ? await runner.watchAllTests() : await runner.runAllTests();
|
||||
const status = process.env.PWTEST_WATCH ? await runner.watchAllTests() : await runner.runAllTests();
|
||||
await stopProfiling(undefined);
|
||||
if (status === 'interrupted')
|
||||
process.exit(130);
|
||||
|
@ -195,7 +195,6 @@ function watchPlaywrightTest(childProcess: CommonFixtures['childProcess'], baseD
|
||||
const outputDir = path.join(baseDir, 'test-results');
|
||||
const args = ['test'];
|
||||
args.push('--output=' + outputDir);
|
||||
args.push('--watch');
|
||||
args.push('--workers=2', ...paramList);
|
||||
if (options.additionalArgs)
|
||||
args.push(...options.additionalArgs);
|
||||
@ -205,7 +204,7 @@ function watchPlaywrightTest(childProcess: CommonFixtures['childProcess'], baseD
|
||||
command.push(...args);
|
||||
const testProcess = childProcess({
|
||||
command,
|
||||
env: cleanEnv(env),
|
||||
env: cleanEnv({ PWTEST_WATCH: '1', ...env }),
|
||||
cwd,
|
||||
});
|
||||
return testProcess;
|
||||
|
Loading…
Reference in New Issue
Block a user