Skip to content

Commit

Permalink
. d Include Task in questions
Browse files Browse the repository at this point in the history
  • Loading branch information
jonreid committed Sep 17, 2024
1 parent 4d77f7f commit 41dfa84
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,10 @@ func test_dismissingVC() {

The production code completion handler is captured in the verifier's `capturedCompletion` property.

### How can I test something that's presented or dismissed using DispatchQueue.main?
### How can I test something that's presented or dismissed in a Task or using DispatchQueue.main?

Create an expectation in your test case. Fulfill it in the verifier's `testCompletion` closure.
Add a short wait at the start of the Assert phase.
Add a short `waitForExpectations` at the start of the Assert phase.

```swift
@MainActor
Expand Down

0 comments on commit 41dfa84

Please sign in to comment.