You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the time you should put `beforeEach`, `beforeAll`, `afterEach` and `afterAll` hooks outside of `forEach`, so that hooks are executed just once:
28
+
29
+
```js title="example.spec.ts"
30
+
test.beforeEach(async ({ page }) => {
31
+
// ...
32
+
});
33
+
34
+
test.afterEach(async ({ page }) => {
35
+
// ...
36
+
});
37
+
38
+
[
39
+
{ name:'Alice', expected:'Hello, Alice!' },
40
+
{ name:'Bob', expected:'Hello, Bob!' },
41
+
{ name:'Charlie', expected:'Hello, Charlie!' },
42
+
].forEach(({ name, expected }) => {
43
+
test(`testing with ${name}`, async ({ page }) => {
0 commit comments