Skip to content

Commit

Permalink
Merge pull request #356 from adusak/update-docs
Browse files Browse the repository at this point in the history
Update the guide to reflect changes to the async ViewHosting.host function
  • Loading branch information
nalexn authored Nov 28, 2024
2 parents c70b101 + 3971d44 commit 788e787
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,8 @@ If you're writing an `async` test some of the APIs change slightly. The biggest

```swift
let sut = TestView(flag: false)
try await ViewHosting.host(sut) { hostedView in
try await hostedView.inspection.inspect { view in
try await ViewHosting.host(sut) {
try await sut.inspection.inspect { view in
let text = try view.button().labelView().text().string()
XCTAssertEqual(text, "false")
sut.publisher.send(true)
Expand All @@ -610,7 +610,7 @@ For instances where a test is `async` but the view utilizes Combine to listen to

```swift
let sut = TestView(flag: false)
try await ViewHosting.host(sut) { sut in
try await ViewHosting.host(sut) {
try await withThrowingDiscardingTaskGroup { group in
group.addTask {
try await sut.inspection.inspect { view in
Expand Down

0 comments on commit 788e787

Please sign in to comment.