docs(test-runner): worker fixtures only in before/after-All (#9967)
This commit is contained in:
parent
b8b4f904b2
commit
bedb817a00
|
|
@ -66,7 +66,7 @@ Declares an `afterAll` hook that is executed once after all tests. When called i
|
||||||
### param: Test.afterAll.hookFunction
|
### param: Test.afterAll.hookFunction
|
||||||
- `hookFunction` <[function]\([Fixtures], [TestInfo]\)>
|
- `hookFunction` <[function]\([Fixtures], [TestInfo]\)>
|
||||||
|
|
||||||
Hook function that takes one or two arguments: an object with fixtures and optional [TestInfo].
|
Hook function that takes one or two arguments: an object with worker fixtures and optional [TestInfo].
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -157,7 +157,7 @@ You can use [`method: Test.afterAll`] to teardown any resources set up in `befor
|
||||||
### param: Test.beforeAll.hookFunction
|
### param: Test.beforeAll.hookFunction
|
||||||
- `hookFunction` <[function]\([Fixtures], [TestInfo]\)>
|
- `hookFunction` <[function]\([Fixtures], [TestInfo]\)>
|
||||||
|
|
||||||
Hook function that takes one or two arguments: an object with fixtures and optional [TestInfo].
|
Hook function that takes one or two arguments: an object with worker fixtures and optional [TestInfo].
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
4
packages/playwright-test/types/test.d.ts
vendored
4
packages/playwright-test/types/test.d.ts
vendored
|
|
@ -2504,7 +2504,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
|
||||||
*
|
*
|
||||||
* You can use [test.afterAll(hookFunction)](https://playwright.dev/docs/api/class-test#test-after-all) to teardown any
|
* You can use [test.afterAll(hookFunction)](https://playwright.dev/docs/api/class-test#test-after-all) to teardown any
|
||||||
* resources set up in `beforeAll`.
|
* resources set up in `beforeAll`.
|
||||||
* @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional [TestInfo].
|
* @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional [TestInfo].
|
||||||
*/
|
*/
|
||||||
beforeAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
|
beforeAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
|
||||||
/**
|
/**
|
||||||
|
|
@ -2512,7 +2512,7 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
|
||||||
* all tests in the file. When called inside a
|
* all tests in the file. When called inside a
|
||||||
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe) group, runs after all tests
|
* [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe) group, runs after all tests
|
||||||
* in the group.
|
* in the group.
|
||||||
* @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional [TestInfo].
|
* @param hookFunction Hook function that takes one or two arguments: an object with worker fixtures and optional [TestInfo].
|
||||||
*/
|
*/
|
||||||
afterAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
|
afterAll(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue