mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: do not expose suite load error (#11797)
This commit is contained in:
parent
011d743f90
commit
6e2fcc4700
@ -24,11 +24,6 @@ Reporter is given a root suite in the [`method: Reporter.onBegin`] method.
|
||||
|
||||
Returns the list of all test cases in this suite and its descendants, as opposite to [`property: Suite.tests`].
|
||||
|
||||
## property: Suite.loadError
|
||||
- type: <[void]|[TestError]>
|
||||
|
||||
For file suites, contains errors that occurred while loading this file.
|
||||
|
||||
## property: Suite.location
|
||||
- type: <[void]|[Location]>
|
||||
|
||||
|
||||
@ -128,7 +128,7 @@ export class Loader {
|
||||
} catch (e) {
|
||||
if (environment === 'worker')
|
||||
throw e;
|
||||
suite.loadError = serializeError(e);
|
||||
suite._loadError = serializeError(e);
|
||||
} finally {
|
||||
setCurrentlyLoadingFileSuite(undefined);
|
||||
}
|
||||
|
||||
@ -233,8 +233,8 @@ export class Runner {
|
||||
const preprocessRoot = new Suite('');
|
||||
for (const file of allTestFiles) {
|
||||
const fileSuite = await this._loader.loadTestFile(file, 'runner');
|
||||
if (fileSuite.loadError)
|
||||
fatalErrors.push(fileSuite.loadError);
|
||||
if (fileSuite._loadError)
|
||||
fatalErrors.push(fileSuite._loadError);
|
||||
preprocessRoot._addSuite(fileSuite);
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,6 @@ export type Modifier = {
|
||||
export class Suite extends Base implements reporterTypes.Suite {
|
||||
suites: Suite[] = [];
|
||||
tests: TestCase[] = [];
|
||||
loadError?: reporterTypes.TestError;
|
||||
location?: Location;
|
||||
parent?: Suite;
|
||||
_use: FixturesWithLocation[] = [];
|
||||
@ -53,6 +52,7 @@ export class Suite extends Base implements reporterTypes.Suite {
|
||||
_modifiers: Modifier[] = [];
|
||||
_parallelMode: 'default' | 'serial' | 'parallel' = 'default';
|
||||
_projectConfig: FullProject | undefined;
|
||||
_loadError?: reporterTypes.TestError;
|
||||
|
||||
_addTest(test: TestCase) {
|
||||
test.parent = this;
|
||||
|
||||
@ -70,10 +70,6 @@ export interface Suite {
|
||||
* group suite.
|
||||
*/
|
||||
title: string;
|
||||
/**
|
||||
* For file suites, contains errors that occurred while loading this file.
|
||||
*/
|
||||
loadError?: TestError;
|
||||
/**
|
||||
* Location in the source where the suite is defined. Missing for root and project suites.
|
||||
*/
|
||||
|
||||
@ -26,7 +26,6 @@ export interface Location {
|
||||
export interface Suite {
|
||||
parent?: Suite;
|
||||
title: string;
|
||||
loadError?: TestError;
|
||||
location?: Location;
|
||||
suites: Suite[];
|
||||
tests: TestCase[];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user