You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[feature request] Multiple expectations in waitUntil() #314
When writing tests with multiple asynchronous components (eg using OHHTTPStubs), it would be nice to do this:
waitUntil{clientDone,serverDoneinstub(alwaysIntercept()){requestinserverDone() // server is satisfied that it received the request
returnOHHTTPStubsResponse(data:someResponse,statusCode:200,headers:nil)}MyObj.doWithCallback{_inclientDone() // client is satisfied that it received and handled the response
}}
At the moment, this doesn't seem to be possible at all, as nested waitUntils are explicitly caught: "Unexpected exception raised: Nested async expectations are not allowed to avoid creating flaky tests."
I'm enjoying using Nimble - it's much cleaner to write with than XCTest - but in this case, XCTest's expectations seem to be the better tool for the job.
Activity
[-]Multiple expectations in waitUntil()[/-][+][feature request] Multiple expectations in waitUntil()[/+]jeffh commentedon Sep 13, 2016
Thanks for filing an issue, @d-lord.
I agree, having
waitUntilor another Nimble function that can specify the number of successful callbacks would be valuable.