Skip to content

Commit

Permalink
fix(output): clear output before global setup (microsoft#29584)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Feb 20, 2024
1 parent b811df4 commit a023cd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/playwright/src/runner/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions utils/pack_package.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')) {
Expand Down

0 comments on commit a023cd1

Please sign in to comment.