Skip to content

Commit cdac9e1

Browse files
committed
flow
1 parent b60e1ea commit cdac9e1

File tree

1 file changed

+2
-2
lines changed
  • exercises/03.best-practices/04.solution.element-presence

1 file changed

+2
-2
lines changed

exercises/03.best-practices/04.solution.element-presence/README.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ And now I will write a regular assertion with `expect.element()` using the `.not
3737
await expect.element(discountText).not.toBeInTheDocument()
3838
```
3939

40-
So why does this work?
40+
So how does this work?
4141

4242
It's due to the retry mechanism built-in into `expect.element()`, which automatically makes Vitest `waitFor` the given assertion. Even if it takes time to remove the `discountText` element from the page, our test will wait until that happens and throw if it doesn't.
4343

44-
> 🦉 You can configure the retry options on `expect.element()` by providing them as the second argument to that function:
44+
> 🦉 You can configure the retry options on `expect.element()` by providing them as the second argument to the function:
4545
>
4646
> ```ts nonumber
4747
> await expect.element(locator, { interval, timeout })

0 commit comments

Comments
 (0)