fix(output): clear output before global setup (#29584)
This commit is contained in:
Родитель
b811df4ac1
Коммит
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')) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче