move tracesDir

This commit is contained in:
Simon Knott 2025-02-07 14:42:31 +01:00
parent ffc0ea9cb5
commit ff4567727e
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -78,6 +78,7 @@ const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
const options: LaunchOptions = { const options: LaunchOptions = {
handleSIGINT: false, handleSIGINT: false,
...launchOptions, ...launchOptions,
tracesDir: tracing().tracesDir(),
}; };
if (headless !== undefined) if (headless !== undefined)
options.headless = headless; options.headless = headless;
@ -85,7 +86,6 @@ const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
options.channel = channel; options.channel = channel;
playwright._defaultLaunchOptions = options; playwright._defaultLaunchOptions = options;
playwright._defaultLaunchOptions.tracesDir = tracing().tracesDir();
await use(options); await use(options);
playwright._defaultLaunchOptions = undefined; playwright._defaultLaunchOptions = undefined;
}, { scope: 'worker', auto: true, box: true }], }, { scope: 'worker', auto: true, box: true }],