Nimble: [4.1.0] Attempted to report a test failure to XCTest while no test case was running.

Created on 14 Jul 2016  路  2Comments  路  Source: Quick/Nimble

Similar to https://github.com/Quick/Nimble/issues/276

Here's my code:

let promise = TestUtils.getMockServerJSON(method: .POST, path: "/accounts")
expect(promise.fulfilled).toEventually(beTrue())

expect { _ -> Account in
    return try Unbox(promise.value!) // Failure here
}.toNot(throwError())

I'll workaround it by doing a do/catch for now.

Most helpful comment

My bad, I was putting this code in a describe instead of a it. Closing.

All 2 comments

Update: do/catch doesn't work around the issue :/

My bad, I was putting this code in a describe instead of a it. Closing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pavel-primachek picture pavel-primachek  路  3Comments

Blackjacx picture Blackjacx  路  7Comments

wrutkowski picture wrutkowski  路  9Comments

Blackjacx picture Blackjacx  路  9Comments

zachlucas picture zachlucas  路  5Comments