Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 527 Bytes

File metadata and controls

21 lines (14 loc) · 527 Bytes

Expectations

A short & sweet expectation implementation written in Swift. See the blog post for the rationale behind it.

This is similar to using an XCTestExpectation.

Usage

Simply create an expectation, pass it to an asynchronous task and wait on it.

let expectation = Expectation()
someAsynchronousMethodCall() {
    expectation.fulfill()
}

expectation.wait(for: 5)

Installation

It's just a single file, copy it to your project and you're done.