Irrespective of your views on mocks versus fakes, ...
# multiplatform
m
Irrespective of your views on mocks versus fakes, sometimes, mocks are useful. The problem is, how do you mock in KMP projects? We spent countless hours thinking about this problem and we are happy to share our new project, MockingBird, which aims to solve this problem. Would love some feedback from the community and ideas on how we can improve this and make it better. small onboarding article: https://www.msignoretto.com/blog/mockingbird_getstarted and official Github repository: https://github.com/careem/mockingbird
🎉 15
👏 6
K 15
👍 6
b
Nice work! I think you could replace the need for the generateMocksFor function with an annotation and KSP, it would make it easier to refractor because I assume the IDE will just ignore the strings
2
m
@Benoît Thank you for the feedback, it is actually on our plans, we split it in 2 kind of milestones 1 is to generate the mocks the second one that we called "mock discovery" is to actually do that and get rid of the
generateMocksFor
we are still working on improving point one. But since you raise that we might change our priorities.
b
Well don't worry too much about my opinion I use functional programming and haven't used a mocking library in years and that's unlikely to change 😅 I just thought I'd tell you how I would have implemented it myself
m
Excellent 👏 Looks like the
main
branch doesn't contain the latest compiler stuff? Might be worth merging
generate-mocks
or another branch?
👍 1
✔️ 1
m
@mbonnin you are right, we are going to merge it on master soon
🎉 1