leandro
09/10/2021, 7:56 PM@Test fun `on zero throws`() {
assertFailsWith<ArithmeticException> {
1 / 0
}
}
it fails with the following message “AssertionError: Expected an exception of class ArithmeticException to be thrown, but was completed successfully.”ephemient
09/10/2021, 9:25 PMephemient
09/10/2021, 9:26 PMleandro
09/10/2021, 10:30 PMArithmeticException
) in a commonTest that is run on all different targets? it naturally succeeds on jvm and ios, but not on jsephemient
09/10/2021, 10:53 PM1L / 0L
throws on K/JS, but not the same exception. in the future, stdlib will also add a cross-platform BigInteger type, but it will leverage JS BigInt and thus also throw native exception. I don't think this is something you can do, cross-platform.leandro
09/10/2021, 10:59 PMephemient
09/11/2021, 12:37 AM@OptionalAnnotation
@Target([AnnotationTarget.CLASS, AnnotationTarget.FUNCTION])
expect annotation class JsIgnore
and then only in JS source set
actual typealias JsIgnore = kotlin.test.Ignore
would work