From b0e57454f25a20859b7009ce3f7ffbd84e30ea96 Mon Sep 17 00:00:00 2001 From: Mathias Leppich Date: Mon, 9 Sep 2024 18:32:03 +0200 Subject: [PATCH] use lastRunFile from config when defined --- packages/playwright/src/runner/reporters.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/playwright/src/runner/reporters.ts b/packages/playwright/src/runner/reporters.ts index c077cef99d..afe9c878bf 100644 --- a/packages/playwright/src/runner/reporters.ts +++ b/packages/playwright/src/runner/reporters.ts @@ -80,7 +80,7 @@ export async function createReporters(config: FullConfigInternal, mode: 'list' | if (!isTestServer && (mode === 'test' || mode === 'merge')) { // If we are not in the test server, always add a last-run reporter. - const lastRunOutputFile = config.projects.length >= 0 ? path.join(config.projects[0].project.outputDir, '.last-run.json') : undefined; + const lastRunOutputFile = config.lastRunFile ?? config.projects.length >= 0 ? path.join(config.projects[0].project.outputDir, '.last-run.json') : undefined; reporters.push(new LastRunReporter({ ...runOptions, outputFile: lastRunOutputFile })); }