feat: add name for plugins (#13826)

Useful for debugging and eventually for reporters to give status updates on which phase of which plugin they are currently running.
This commit is contained in:
Ross Wollman 2022-04-28 11:43:39 -07:00 committed by GitHub
parent e124d926ee
commit 45972a0b6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 0 deletions

View file

@ -1,6 +1,9 @@
# class: TestPlugin
* langs: js
## property: TestPlugin.name
- type: <[string]>
## optional async method: TestPlugin.configure
### param: TestPlugin.configure.config
- `config` <[TestConfig]>

View file

@ -35,6 +35,8 @@ export function createPlugin(
const port = options.port || 3100;
let configDir: string;
return {
name: 'playwright-vite-plugin',
configure: async (config: PlaywrightTestConfig, configDirectory: string) => {
configDir = configDirectory;
const url = `http://localhost:${port}/playwright/index.html`;

View file

@ -3638,6 +3638,8 @@ export interface TestError {
}
export interface TestPlugin {
name: string;
/**
* @param config
* @param configDir

View file

@ -20091,6 +20091,8 @@ export interface TestError {
}
export interface TestPlugin {
name: string;
/**
* @param config
* @param configDir