Skip to content

fix: enable confirmVerified to work with static mocks #1396

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

Merged
merged 2 commits into from
May 18, 2025

Conversation

happysubin
Copy link
Contributor

fixes #242

When a static class is mocked using the mockStatic method, its javaClass is used as the key in the stubRepo.
To make use of this, add logic to convert a given KClass to its javaClass and use it in the when clause.

@Raibaz
Copy link
Collaborator

Raibaz commented May 18, 2025

This looks good, thanks for looking into it!

@Raibaz Raibaz merged commit 4bf4ec7 into mockk:master May 18, 2025
22 checks passed
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

Successfully merging this pull request may close these issues.

Bug: enable confirmVerified to work with static mocks
2 participants