mirror of
https://github.com/microsoft/playwright.git
synced 2024-11-24 06:49:04 +03:00
fix(output): clear output before global setup (#29584)
This commit is contained in:
parent
b811df4ac1
commit
a023cd1f57
@ -84,12 +84,12 @@ export function createTaskRunnerForWatch(config: FullConfigInternal, reporter: R
|
||||
}
|
||||
|
||||
function addGlobalSetupTasks(taskRunner: TaskRunner<TestRun>, config: FullConfigInternal) {
|
||||
if (!config.configCLIOverrides.preserveOutputDir && !process.env.PW_TEST_NO_REMOVE_OUTPUT_DIRS)
|
||||
taskRunner.addTask('clear output', createRemoveOutputDirsTask());
|
||||
for (const plugin of config.plugins)
|
||||
taskRunner.addTask('plugin setup', createPluginSetupTask(plugin));
|
||||
if (config.config.globalSetup || config.config.globalTeardown)
|
||||
taskRunner.addTask('global setup', createGlobalSetupTask());
|
||||
if (!config.configCLIOverrides.preserveOutputDir && !process.env.PW_TEST_NO_REMOVE_OUTPUT_DIRS)
|
||||
taskRunner.addTask('clear output', createRemoveOutputDirsTask());
|
||||
}
|
||||
|
||||
function addRunTasks(taskRunner: TaskRunner<TestRun>, config: FullConfigInternal) {
|
||||
|
@ -19,6 +19,7 @@ const os = require('os');
|
||||
const path = require('path');
|
||||
const { spawnSync } = require('child_process');
|
||||
|
||||
const SCRIPT_NAME = path.basename(__filename);
|
||||
// 1. Parse CLI arguments
|
||||
const args = process.argv.slice(2);
|
||||
if (args.some(arg => arg === '--help')) {
|
||||
|
Loading…
Reference in New Issue
Block a user