testable-view-swiftui icon indicating copy to clipboard operation
testable-view-swiftui copied to clipboard

How would you test a .task ?

Open smiLLe opened this issue 10 months ago • 2 comments

How would I test an async task in a View which just shows some simple data, loaded from an api?

.task {
   let result = await api.loadData()
   self.data = result
}

smiLLe avatar Mar 28 '24 13:03 smiLLe