chore: render readable title separator in errors (#19754)

This commit is contained in:
Pavel Feldman 2023-01-09 09:33:09 -08:00 committed by GitHub
parent bb275cccb6
commit 6083926111
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -99,8 +99,7 @@ export class BaseReporter implements ReporterInternal {
}
onError(error: TestError) {
if (!(error as any).__isNotAFatalError)
this._fatalErrors.push(error);
this._fatalErrors.push(error);
}
async onEnd(result: FullResult) {

View File

@ -945,7 +945,7 @@ function createDuplicateTitlesErrors(config: FullConfigInternal, rootSuite: Suit
for (const fileSuite of rootSuite.suites) {
const testsByFullTitle = new Map<string, TestCase>();
for (const test of fileSuite.allTests()) {
const fullTitle = test.titlePath().slice(2).join('\x1e');
const fullTitle = test.titlePath().slice(2).join(' ');
const existingTest = testsByFullTitle.get(fullTitle);
if (existingTest) {
const error: TestError = {