Skip to content

Commit

Permalink
waitFor FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
sgravrock committed Sep 2, 2023
1 parent 4ef412d commit b76d322
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions _faq/other-software/testing-library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
question: How can I use Jasmine matchers with testing-library's waitFor function?
---

Use `throwUnless` instead of `expect`:

```
await waitFor(function() {
throwUnless(myDialogElement).toHaveClass('open');
});
```

0 comments on commit b76d322

Please sign in to comment.