OK. I looked around, and didn\'t find an exact answer to my issue.
I am trying to test a timeout handler in a unit test (not the main run).
The issue seems t
Looks something like this in Swift 3.0 with XCTest.
// somebody has to call the .fulfill() method on this variable
// to the expectation will fail after 25 seconds
var asyncExpectation : XCTestExpectation!
func testExample() {
asyncExpectation = expectation(description: "longRunningFunction")
self.waitForExpectations(timeout: 25.0) { (error) in
if let error = error {
print("Error \(error)")
}
}
// more stuff here
}