I have all my tests in `commonTest`. Is it possibl...
# multiplatform
p
I have all my tests in
commonTest
. Is it possible to choose just one target to run the tests?
b
You could mark the test tasks you don't want to run as enabled = false
p
Ah, true.
Thanks
b
No prob!
r
You can also do something like
@OptionalExpectation expect annotation class SinglePlatformTest
and then for the platform you’re interested do
actual annotation class SinglePlatformTest = kotlin.Test
. Then annotate tests with
@SinglePlatformTest
if you want them to only run on that platform. This pattern can give you pretty fine-grained control over which tests run on which platforms.
🙌 2