mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
fix(test runner): properly match test suffix (#7392)
This commit is contained in:
parent
18266722a1
commit
a1f9fc3f32
@ -184,7 +184,7 @@ export class WorkerRunner extends EventEmitter {
|
|||||||
const testId = test._id;
|
const testId = test._id;
|
||||||
|
|
||||||
const baseOutputDir = (() => {
|
const baseOutputDir = (() => {
|
||||||
const relativeTestFilePath = path.relative(this._project.config.testDir, spec._requireFile.replace(/\.(spec|test)\.(js|ts|mjs)/, ''));
|
const relativeTestFilePath = path.relative(this._project.config.testDir, spec._requireFile.replace(/\.(spec|test)\.(js|ts|mjs)$/, ''));
|
||||||
const sanitizedRelativePath = relativeTestFilePath.replace(process.platform === 'win32' ? new RegExp('\\\\', 'g') : new RegExp('/', 'g'), '-');
|
const sanitizedRelativePath = relativeTestFilePath.replace(process.platform === 'win32' ? new RegExp('\\\\', 'g') : new RegExp('/', 'g'), '-');
|
||||||
let testOutputDir = sanitizedRelativePath + '-' + sanitizeForFilePath(spec.title);
|
let testOutputDir = sanitizedRelativePath + '-' + sanitizeForFilePath(spec.title);
|
||||||
if (this._uniqueProjectNamePathSegment)
|
if (this._uniqueProjectNamePathSegment)
|
||||||
|
Loading…
Reference in New Issue
Block a user