hi all, is using the KSP or all-open plugin the o...
# test
m
hi all, is using the KSP or all-open plugin the only way to mock classes in Multiplatform project tests? currently, we are trying to migrate away from MockK since it doesn't support Multiplatform. we found that most mocking libraries either use KSP or all-open plugins, which require annotating the classes that need to be mocked. we’re not entirely comfortable with this approach, as it introduces test-related annotations/code into
commonMain
. right now, we’re leaning towards using Mokkery since it makes migration easier syntax-wise. however, it still requires us to annotate the classes for mocking. crossposting from #C3PQML5NU since it also make sense to ask here
j
The best migration is dropping Mockk/Mockito frameworks and the concept behind them. Fakes > Mocks
m
I mean, sure, that’s something I would do for smaller projects or my personal project since I personally prefer fakes over mocks. But, migrating hundreds of already defined test cases to use fakes impl feels like a bigger hurdle than simply finding a mock library with a syntax similar to mockk.