Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to mock a method defined as expect #72

Closed
jorgezim opened this issue Dec 1, 2023 · 1 comment
Closed

How to mock a method defined as expect #72

jorgezim opened this issue Dec 1, 2023 · 1 comment

Comments

@jorgezim
Copy link

jorgezim commented Dec 1, 2023

Hello, first thanks for this great library.

In my project I have a expect method call logDebug which is defined inside the Platform file and is has an implementation on. the Android side and on the IOS Side. When this method is used inside of the classes I am testing I get a -> Method d in android.util.Log not mocked (running the test on Android)

I wonder if there's a way to mock expect/actual methods and how do it?

Thanks!

@jorgezim jorgezim changed the title How to mock a method defined in Platform How to mock a method defined as expect Dec 1, 2023
@SalomonBrys
Copy link
Member

There is none. At the moment, KSP does not support multiplatform well (which is why we have to resort to the JVM sourceset trick).
Support of expect/actual is tracked by #18 and might become possible with KSP 2.0, when it relases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants