Code Monkey home page Code Monkey logo

Comments (3)

crocsandcoffee avatar crocsandcoffee commented on July 1, 2024

Awesome topic - might be better have thrown this under General Discussion first to reduce some noise/discussions, but all good! Lets see what others think and then we bring this in

I am most familiar with https://mockk.io/ but don't know if there are any implications with use in a KMP project. We should also write up some documentation/best practices in this repo with guidelines on when to use fakes vs mocks. It's a discussion that happens often in the community and this repo could serve as a great source of documentation and knowledge for best practices etc.

from dodoformastodon.

bitPogo avatar bitPogo commented on July 1, 2024

Mockk only works on jvm/android...so no KMP/you can only run tests on those platforms.
Besides, I think we need to clarify the terminology first (I definitely spend too much time on that topic) - I go by the definitions of M. Fowler. I am not sure what you mean by fakes, since these are in my experience the most expensive one.

MocKMP feels closest to mockk at first. But (cautious I am opinionated) has its issues might still break from case to case (but it got better). MocKMP is like mockk intrusive and provides only mocks.

Mockative is semi intrusive, but super opinionated about its usage.

KMock is also semi intrusive, since it produces Stubs, but you can also use it like mocks (with runs). Also, KMock can provide spies* which the others do not have so far I am aware of.

And I totally agree, this repo can be source of documentation as real life product.

from dodoformastodon.

evant avatar evant commented on July 1, 2024

Not really a fan of mocking libs personally. I should really write a blog post about it, but https://www.billjings.com/posts/title/fakes-are-great-but-mocks-i-hate/ covers some problems pretty well.

from dodoformastodon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.