-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Getting error "A mock for the type X was not generated." #59
Comments
Some further details, when printing all configurations I noticed there isn't any configuration that starts with "ksp" and contains "Test".
|
After update to version 1.3.1, I'm having the same Issue. @lammertw did you already find a fix for it? |
@magnumrocha No, I never got this solved and switched to MocKMP instead. |
Hi @lammertw I apologize for my long hiatus from this project. I have recently picked up the open issues and while investigating yours I haven't been able to replicate the behavior. It could have been a Kotlin / KSP 1.8 compatibility issue, but despite it meaning you changed to MocKMP, I am happy that you have found a solution. @magnumrocha You mention you see the same issue. I will release an update to Mockative within the next 2 days, which updates Kotlin to 1.8.10 as well as updates KSP. Will you care to test whether that works for you? I will ping you in here once the release is available. Should that not work please share some related snippets of code from your project so I can have a look at it. Thanks |
@Nillerr cool, I'll wait to test the update. |
Hi again @magnumrocha. I have released v1.4.0 this morning. Please let me know if this addresses the issue you're seeing, |
Having the same error on v1.4.1 |
Are you guys still experiencing this issue? |
I still face this issue. I run test on my Macbook M1 Pro chip |
Hello, I am facing the same error, on a KMM project, version 2.0.1, using a Macbook M1 Pro. |
I was facing the same problem with my Kotlin Multiplatform project (JVM/JS) using version 2.0.1 and Kotlin 1.9.0 (also on MacBook M1 Pro, although I don't think that matters). I guess in my the case the issue was related to my project structure. I'm using Gradle subprojects, each of which as a multiplatform structure. This build.gradle.kts worked for me (extract):
|
I have an interface called
Functions
:In my test class, I try to create a mock for it:
When running the test it fails with:
I've followed the instructions from the readme for the build file, however just adding the tsp plugin without version didn't work for me. So instead I have:
The rest is the same as in the readme:
The text was updated successfully, but these errors were encountered: