Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs(test-runner): afterEach JSDoc description typo (#9542)

Paul Biggare473fc6a1051
diff --git a/docs/src/test-api/class-test.md b/docs/src/test-api/class-test.md
index 6db4e3bfee..bc6b29e377 100644
--- a/docs/src/test-api/class-test.md
+++ b/docs/src/test-api/class-test.md
@@ -72,7 +72,7 @@ Hook function that takes one or two arguments: an object with fixtures and optio
## method: Test.afterEach
-Declares an `afterEach` hook that is executed after each test. When called in the scope of a test file, runs before each test in the file. When called inside a [`method: Test.describe`] group, runs before each test in the group.
+Declares an `afterEach` hook that is executed after each test. When called in the scope of a test file, runs after each test in the file. When called inside a [`method: Test.describe`] group, runs after each test in the group.
### param: Test.afterEach.hookFunction
- `hookFunction` <[function]\([Fixtures], [TestInfo]\)>
diff --git a/packages/playwright-test/types/test.d.ts b/packages/playwright-test/types/test.d.ts
index 12b594d7ab..ae1941a152 100644
--- a/packages/playwright-test/types/test.d.ts
+++ b/packages/playwright-test/types/test.d.ts
@@ -2173,9 +2173,9 @@ export interface TestType<TestArgs extends KeyValue, WorkerArgs extends KeyValue
*/
beforeEach(inner: (args: TestArgs & WorkerArgs, testInfo: TestInfo) => Promise<any> | any): void;
/**
- * Declares an `afterEach` hook that is executed after each test. When called in the scope of a test file, runs before each
+ * Declares an `afterEach` hook that is executed after each test. When called in the scope of a test file, runs after each
* test in the file. When called inside a
- * [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe) group, runs before each test
+ * [test.describe(title, callback)](https://playwright.dev/docs/api/class-test#test-describe) group, runs after each test
* in the group.
* @param hookFunction Hook function that takes one or two arguments: an object with fixtures and optional [TestInfo].
*/