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:
parent
e124d926ee
commit
45972a0b6a
|
|
@ -1,6 +1,9 @@
|
|||
# class: TestPlugin
|
||||
* langs: js
|
||||
|
||||
## property: TestPlugin.name
|
||||
- type: <[string]>
|
||||
|
||||
## optional async method: TestPlugin.configure
|
||||
### param: TestPlugin.configure.config
|
||||
- `config` <[TestConfig]>
|
||||
|
|
|
|||
|
|
@ -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`;
|
||||
|
|
|
|||
2
packages/playwright-test/types/test.d.ts
vendored
2
packages/playwright-test/types/test.d.ts
vendored
|
|
@ -3638,6 +3638,8 @@ export interface TestError {
|
|||
}
|
||||
|
||||
export interface TestPlugin {
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* @param config
|
||||
* @param configDir
|
||||
|
|
|
|||
2
tests/config/experimental.d.ts
vendored
2
tests/config/experimental.d.ts
vendored
|
|
@ -20091,6 +20091,8 @@ export interface TestError {
|
|||
}
|
||||
|
||||
export interface TestPlugin {
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* @param config
|
||||
* @param configDir
|
||||
|
|
|
|||
Loading…
Reference in a new issue