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
I was showing your project to my team and I found some failing tests.
So, I cloned the project and ran the tests and some tests on AlamofireAsyncTests failed.
I notice that the failing tests are those that check for failing responses, with the message saying that expect TestError but got nil instead.
I tried to fix it with the code below
lettestError=NSError(domain:"AsynchronousTests", code:0, userInfo:nil)func testDataRequestResponseFailure(){letexpected= testError
stub(everything,failure(expected asNSError))wait{ expectation inAlamofire.request(fakeURL).response().async{ result in
switch result {case.success(let(_, _, value)):XCTFail("Unexpected value \(value)")case.failure(let actual):XCTAssertEqual(expected, actual.error asNSError)}
expectation.fulfill()}}}
but got this error
XCTAssertEqual failed: ("Error Domain=AsynchronousTests Code=0 "(null)"") is not equal to ("Error Domain=AsynchronousTests Code=0 "(null)" UserInfo={_NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <0063E615-BE9B-4022-AC07-1F06C14BDF97>.<1>"
), _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <0063E615-BE9B-4022-AC07-1F06C14BDF97>.<1>}")
So I think Mockingjay is returning another error or something like this. I looked at Mockingjay tests and here they are just verifying the error's domain.
Should we do the same maybe?
Also, I tried calling super.setUphere but the results were the same.
I running with this environment
Xcode 11.2.1
Build version 11B500
Could you please take a look at this?
Thanks!
The text was updated successfully, but these errors were encountered:
Hey!
I was showing your project to my team and I found some failing tests.
So, I cloned the project and ran the tests and some tests on
AlamofireAsyncTests
failed.I notice that the failing tests are those that check for failing responses, with the message saying that expect
TestError
but gotnil
instead.I tried to fix it with the code below
but got this error
So I think
Mockingjay
is returning another error or something like this. I looked atMockingjay
tests and here they are just verifying the error's domain.Should we do the same maybe?
Also, I tried calling
super.setUp
here but the results were the same.I running with this environment
Could you please take a look at this?
Thanks!
The text was updated successfully, but these errors were encountered: