Type Method

wait(for:timeout:)

Creates a waiter that waits on a group of expectations for up to the specified timeout.

Declaration

class func wait(for expectations: [XCTestExpectation], timeout seconds: TimeInterval) -> XCTWaiter.Result

Parameters

expectations

The expectations to wait for.

seconds

The amount of time within which all expectations must be fulfilled.

Discussion

May return early based on fulfillment of the waited on expectations. The waiter is discarded when the wait completes.

See Also

Waiting for Expectations

func wait(for: [XCTestExpectation], timeout: TimeInterval) -> XCTWaiter.Result

Waits on a group of expectations for up to the specified timeout.

func wait(for: [XCTestExpectation], timeout: TimeInterval, enforceOrder: Bool) -> XCTWaiter.Result

Waits on a group of expectations for up to the specified timeout, optionally enforcing their order of fulfillment.

class func wait(for: [XCTestExpectation], timeout: TimeInterval, enforceOrder: Bool) -> XCTWaiter.Result

Creates a waiter that waits on a group of expectations for up to the specified timeout, optionally enforcing their order of fulfillment.

enum XCTWaiter.Result

Result states returned by a waiter when it completes, times out, fails, or is interrupted.