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
|
# class: TestPlugin
|
||||||
* langs: js
|
* langs: js
|
||||||
|
|
||||||
|
## property: TestPlugin.name
|
||||||
|
- type: <[string]>
|
||||||
|
|
||||||
## optional async method: TestPlugin.configure
|
## optional async method: TestPlugin.configure
|
||||||
### param: TestPlugin.configure.config
|
### param: TestPlugin.configure.config
|
||||||
- `config` <[TestConfig]>
|
- `config` <[TestConfig]>
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ export function createPlugin(
|
||||||
const port = options.port || 3100;
|
const port = options.port || 3100;
|
||||||
let configDir: string;
|
let configDir: string;
|
||||||
return {
|
return {
|
||||||
|
name: 'playwright-vite-plugin',
|
||||||
|
|
||||||
configure: async (config: PlaywrightTestConfig, configDirectory: string) => {
|
configure: async (config: PlaywrightTestConfig, configDirectory: string) => {
|
||||||
configDir = configDirectory;
|
configDir = configDirectory;
|
||||||
const url = `http://localhost:${port}/playwright/index.html`;
|
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 {
|
export interface TestPlugin {
|
||||||
|
name: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param config
|
* @param config
|
||||||
* @param configDir
|
* @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 {
|
export interface TestPlugin {
|
||||||
|
name: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param config
|
* @param config
|
||||||
* @param configDir
|
* @param configDir
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue