Skip to content

Commit

Permalink
cherry-pick(#21942): chore: show global setup errors in ui mode
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Mar 23, 2023
1 parent 72382fa commit e169cd3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/playwright-test/src/runner/uiMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class UIMode {
}

async runGlobalSetup(): Promise<FullResult['status']> {
const reporter = await createReporter(this._config, 'watch');
const reporter = await createReporter(this._config, 'run');
const taskRunner = createTaskRunnerForWatchSetup(this._config, reporter);
reporter.onConfigure(this._config);
const context: TaskRunnerState = {
Expand All @@ -75,6 +75,7 @@ class UIMode {
phases: [],
};
const { status, cleanup: globalCleanup } = await taskRunner.runDeferCleanup(context, 0);
await reporter.onExit({ status });
if (status !== 'passed') {
await globalCleanup();
return status;
Expand Down Expand Up @@ -151,7 +152,7 @@ class UIMode {
clearCompilationCache();
reporter.onConfigure(this._config);
const status = await taskRunner.run(context, 0);
reporter.onExit({ status });
await reporter.onExit({ status });

const projectDirs = new Set<string>();
for (const p of this._config.projects)
Expand Down

0 comments on commit e169cd3

Please sign in to comment.