Up to now I've been using Combine and the PointFree TestSchedulers https://github.com/pointfreeco/combine-schedulers to "control time" in my tests.
I can make a request and then assert values at certain points in the process without any trouble.
Example...
func testFetchContentSuccess() {
let queue = TestSchedulerOf<DispatchQueue>(now: .init(.now()))
let sut = sut(queue: queue.eraseToAnyScheduler())
XCTAssertEqual(sut.content, .notAsked)
sut.fetchContent()
XCTAssertEqual(sut.content, .loading) // this would be impossible without a TestScheulder as the mock endpoint would return immediately.
queue.advance() // this is what I'm looking for from async await
assertSnapshot(matching: sut.content, as: .dump)
}
Is there a way to do something similar with async await?