-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use XCTestExpectation #590
Comments
👍 |
Would you mind explaining why you feel that |
Kiwi's Consider this example borrowed from NSHipster:
|
+1 Running into problems with Kiwi + OHHTPPStub https://github.com/AliSoftware/OHHTTPStubs/wiki/OHHTTPStubs-and-asynchronous-tests |
Thanks for the idea, @fabb! This would be cool, and has been discussed on other testing/expectation frameworks: Quick/Nimble#28. My thoughts, echoed in that pull request, is that Closing this for now -- we probably don't have the resources to really explore this idea further, even if it was something we wanted. |
Using
XCTestExpectation
makes testing of async functionality possible. There isshouldEventually
in Kiwi, but it is not as flexible asXCTestExpectation
.To create a new promise with
XCTestExpectation
it is necessary to accessself
which is not possible in Kiwi AFAIK. Any ideas, workarounds.At the moment I use
RXPromise
as a workaround, with itsrunLoopWait
method I can wait for the promise to be fulfilled/rejected in a test case. I'd prefer to useXCTestExpectation
though.The text was updated successfully, but these errors were encountered: