Skip to content

Instantly share code, notes, and snippets.

@codeslubber
Created August 9, 2016 16:44
Show Gist options
  • Save codeslubber/87f22f9f0bae5fcaa6996e491acfe43b to your computer and use it in GitHub Desktop.
Save codeslubber/87f22f9f0bae5fcaa6996e491acfe43b to your computer and use it in GitHub Desktop.
let testExpectation = expectation(description: "<#description#>")
// do something then call fulfill (in callback)
testExpectation.fulfill()
waitForExpectations(timeout: <#timeout#>){ error in
if error != nil {
XCTFail("timed out waiting on expectation: \(testExpectation)")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment