https://kotlinlang.org logo
r

Rak

11/09/2021, 11:14 PM
Is there something specific about throwing exceptions when dealing with iOS? I have this test:
Copy code
@Test
fun expiredJwToken() = runTest {
    addMockApi(
        MockEngine {
            respondError(
                status = HttpStatusCode.Forbidden
            )
        }
    )

    assertFailsWith<JwtNotValidException> {
        model.getTrustomer(INVALID_ETAG)
    }
}
It works in the IDE for both android and ios, however it fails on the command line (gradlew clean build) with: com.sensynehealth.shared.data.TrustomerModelTest.expiredJwToken FAILED .AssertionError at null:-1 which I think means no exception was not thrown. Any ideas?