fix(test runner): improve error message for non-stable test titles (#23792)

Fixes #23779.
This commit is contained in:
Dmitry Gozman 2023-06-19 14:13:11 -07:00 committed by GitHub
parent 9d3edb0aa3
commit 2c8dd67b0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -379,7 +379,7 @@ export class Dispatcher {
return test.titlePath().slice(1).join(' > ');
});
massSkipTestsFromRemaining(new Set(params.fatalUnknownTestIds), [{
message: `Internal error: unknown test(s) in worker:\n${titles.join('\n')}`
message: `Test(s) not found in the worker process. Make sure test titles do not change:\n${titles.join('\n')}`
}]);
}
if (params.fatalErrors.length) {

View File

@ -331,7 +331,7 @@ test('should not hang if test suites in worker are inconsistent with runner', as
expect(result.passed).toBe(1);
expect(result.failed).toBe(1);
expect(result.skipped).toBe(1);
expect(result.report.suites[0].specs[1].tests[0].results[0].error!.message).toBe('Internal error: unknown test(s) in worker:\nproject-name > a.spec.js > Test 1 - bar\nproject-name > a.spec.js > Test 2 - baz');
expect(result.report.suites[0].specs[1].tests[0].results[0].error!.message).toBe('Test(s) not found in the worker process. Make sure test titles do not change:\nproject-name > a.spec.js > Test 1 - bar\nproject-name > a.spec.js > Test 2 - baz');
});
test('sigint should stop global setup', async ({ runInlineTest }) => {