fix .last-run.json location

This commit is contained in:
Mathias Leppich 2024-09-09 17:08:41 +02:00
parent 4b3d75467a
commit 89458dbc67

View file

@ -80,7 +80,8 @@ 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.
reporters.push(new LastRunReporter(runOptions));
const lastRunOutputFile = config.projects.length >= 0 ? path.join(config.projects[0].project.outputDir, '.last-run.json') : undefined;
reporters.push(new LastRunReporter({ ...runOptions, outputFile: lastRunOutputFile }));
}
return reporters;