fix(test-runner): mark attach as async (#13687)

Also brings back generation of experimental types as part of lint.
This commit is contained in:
Ross Wollman 2022-04-22 09:27:02 -07:00 committed by GitHub
parent c7212e6d56
commit 3eac9c694c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 6 deletions

View file

@ -98,7 +98,7 @@ The list of files or buffers attached to the overall test run. Some reporters sh
To add an attachment, use [`method: GlobalInfo.attach`]. See [`property: TestInfo.attachments`] if you are looking for test-scoped attachments.
## method: GlobalInfo.attach
## async method: GlobalInfo.attach
Attach a value or a file from disk to the overall test run. Some reporters show global attachments. Either [`option: path`] or [`option: body`] must be specified, but not both.

View file

@ -42,7 +42,7 @@ The list of files or buffers attached to the current test. Some reporters show t
To add an attachment, use [`method: TestInfo.attach`] instead of directly pushing onto this array.
## method: TestInfo.attach
## async method: TestInfo.attach
Attach a value or a file from disk to the current test. Some reporters show test attachments. Either [`option: path`] or [`option: body`] must be specified, but not both.

View file

@ -1474,7 +1474,7 @@ export interface TestInfo {
contentType?: string;
path?: string;
}): void;
}): Promise<void>;
/**
* Column number where the currently running test is declared.

View file

@ -11117,13 +11117,18 @@ export interface Android {
* @param options
*/
devices(options?: {
/**
* Optional host to establish ADB server connection. Default to `127.0.0.1`.
*/
host?: string;
/**
* Prevents automatic playwright driver installation on attach. Assumes that the drivers have been installed already.
*/
omitDriverInstall?: boolean;
/**
* Optional port to establish ADB server connection.
* Optional port to establish ADB server connection. Default to `5037`.
*/
port?: number;
}): Promise<Array<AndroidDevice>>;
@ -17143,7 +17148,7 @@ interface TestConfig {
reuseExistingServer?: boolean;
/**
* Current working directory of the spawned process, `process.cwd()` by default.
* Current working directory of the spawned process, defaults to the directory of the configuration file.
*/
cwd?: string;
@ -17687,7 +17692,7 @@ export interface TestInfo {
contentType?: string;
path?: string;
}): void;
}): Promise<void>;
/**
* Column number where the currently running test is declared.

View file

@ -658,6 +658,7 @@ class TypesGenerator {
writeFile(path.join(coreTypesDir, 'types.d.ts'), await generateCoreTypes(false), true);
writeFile(path.join(testTypesDir, 'test.d.ts'), await generateTestTypes(false), true);
writeFile(path.join(testTypesDir, 'testReporter.d.ts'), await generateReporterTypes(false), true);
writeFile(path.join(__dirname, '..', '..', 'tests', 'config', 'experimental.d.ts'), await generateExperimentalTypes(), true);
process.exit(hadChanges && process.argv.includes('--check-clean') ? 1 : 0);
})().catch(e => {
console.error(e);