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

WIP: test(KMP): use mockative instead of mockito #5706

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

riQQ
Copy link
Collaborator

@riQQ riQQ commented Jun 24, 2024

Preparation for the move to KMP.

~150 tests are still failing. Some are blocked by bugs / missing features in Mockative, but maybe some or all of the failing tests can be changed to work around the issue or to just don't mocks.

Preparation for the move to KMP.
@westnordost

This comment was marked as resolved.

@westnordost
Copy link
Member

westnordost commented Jun 24, 2024

Also, I read somewhere that (at least) JavaScript does not support the fun `my quoted function name`() syntax and therefore this syntax cannot be used in multiplatform projects. I am not sure if this also applies if one does not target JS at all. But if it does, I guess all the nicely readable test functions would need to be renamed from fun `my cool function name`() to fun my_lame_function_name() (or worse, camelCase, but ...🤮)

@riQQ

This comment was marked as resolved.

@westnordost

This comment was marked as resolved.

@westnordost
Copy link
Member

(There are conflicts with master and the PR is marked as draft, that's why I didn't look at it in detail yet. In case you need feedback about something, let me know.)

@riQQ
Copy link
Collaborator Author

riQQ commented Jul 3, 2024

Also, I read somewhere that (at least) JavaScript does not support the fun `my quoted function name`() syntax and therefore this syntax cannot be used in multiplatform projects. I am not sure if this also applies if one does not target JS at all. But if it does, I guess all the nicely readable test functions would need to be renamed from fun `my cool function name`() to fun my_lame_function_name() (or worse, camelCase, but ...🤮)

I've seen this error at some point, I think when writing a test for a Mockative bug. So you're correct that we'll have to rename the methods when switching to the KMP project structure.

@riQQ
Copy link
Collaborator Author

riQQ commented Jul 3, 2024

(There are conflicts with master and the PR is marked as draft, that's why I didn't look at it in detail yet. In case you need feedback about something, let me know.)

Yes, that's why this PR is still a draft. I don't want to put in the work if Mockative doesn't fix / implement everything that is required for the tests here. Progress has slowed down there so I'm waiting, too.

@FloEdelmann FloEdelmann linked an issue Jul 20, 2024 that may be closed by this pull request
@riQQ
Copy link
Collaborator Author

riQQ commented Sep 12, 2024

Mockative is looking for a new maintainer, so this PR depends on Mockative getting a new maintainer.

See mockative/mockative#129.

@westnordost
Copy link
Member

Mockative and that other one not being compatible with K2, it sounds to me that Mokkery would be the only remaining option (for us), if it has the features we need.

@riQQ riQQ added the blocked blocked by another issue label Sep 12, 2024
@TSampley
Copy link

What a coincidence! I just joined the OpenStreetMap site last week as I'm looking for non-corporate alternatives to Google maps! I just saw the bad news about Mockkative 😔 - I hope I can support this nifty effort!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked blocked by another issue
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

Use multiplatform mocking library for tests
3 participants