Is it possible to avoid common tests running on a ...
# multiplatform
j
Is it possible to avoid common tests running on a specific platform?
r
You can do something like
Copy code
@OptionalExpectation
expect annotation class JsIgnore
and then only actualize it in JS (for example)
Copy code
actual annotation class JsIgnore = kotlin.test.Ignore
👍 2
I got halfway to building a library around that a while back but wasn't convinced it'd be useful enough to be worth maintaining
j
I think it can be interesting, is it public in your GitHub?
r
I don't think I have it up anywhere. If I do it's pretty old
I tried to do it as a gradle plugin so that it could generate annotations based on your source-sets. It got messy getting it to work for Android because the Android gradle plugin behaves differently than most other platforms
👍 1