Skip to content

Commit

Permalink
chore: rephrase the act comment in readme (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatanBobi authored Dec 2, 2024
1 parent 1162a04 commit f348a2d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ test('counter button increments the count', async () => {
})
```

> 💡 This library doesn't expose or use React's `act`. Instead, you should use Vitest's locators and `expect.element` API that have [retry-ability mechanism](https://vitest.dev/guide/browser/assertion-api) baked in.
> 💡 This library doesn't expose React's `act` and uses it only to flush operations happening as part of `useEffect` during initial rendering and unmouting.
Other use cases are handled by CDP and `expect.element` which both have built-in [retry-ability mechanism](https://vitest.dev/guide/browser/assertion-api).

`vitest-browser-react` also automatically injects `render` method on the `page`. Example:

Expand Down

0 comments on commit f348a2d

Please sign in to comment.