How to unit test exceptions in KN? @Test(expected...
# kotlin-native
j
How to unit test exceptions in KN? @Test(expected = Exception::class) results in error Cannot find a parameter with this name: expected
d
Try using
assertFailsWith<Exception> {  }
instead.
a
BTW, is there any way to set a timeout for test?
d
If you are using coroutines, you can try
withTimeout
but otherwise idk. Try the main channel.