Skip to content

Commit 788e787

Browse files
authored
Merge pull request #356 from adusak/update-docs
Update the guide to reflect changes to the async ViewHosting.host function
2 parents c70b101 + 3971d44 commit 788e787

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

guide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,8 +597,8 @@ If you're writing an `async` test some of the APIs change slightly. The biggest
597597

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

611611
```swift
612612
let sut = TestView(flag: false)
613-
try await ViewHosting.host(sut) { sut in
613+
try await ViewHosting.host(sut) {
614614
try await withThrowingDiscardingTaskGroup { group in
615615
group.addTask {
616616
try await sut.inspection.inspect { view in

0 commit comments

Comments
 (0)