wait(for:)
Waits on a group of expectations.
Declaration
func wait(for expectations: [XCTestExpectation])Parameters
- expectations:
An array of expectations the test must satisfy.
Discussion
In Objective-C code, you might use an expectation to wait on a call to an interface that uses a completion handler to return a result. From Swift code, consider calling withCheckedContinuation(function:_:) to use Concurrency instead of an expectation to wait on the result of a completion handler.