Coder Social home page Coder Social logo

Comments (2)

suztomo avatar suztomo commented on July 23, 2024

(I'm not author of this library) This library is becoming more "fake" than "mock". To prepare database that contain some data, you need to populate it.

mockFirestoreInstance.collection("users").add({"name": "suztomo"});

If you just need a mock, using mockito (without cloud_firestore_mocks) should suffice.

@atn832 In document, you may want to clarify which parts are "fake" and what are "mock". (I believe this library is a "fake", and fake is suitable for my usage)
Difference between fake and mock: https://blog.pragmatists.com/test-doubles-fakes-mocks-and-stubs-1a7491dfa3da

from fake_cloud_firestore.

atn832 avatar atn832 commented on July 23, 2024

You're right, calling the library mocks is a misnomer. It was true initially since everything extended Mock and implementation was minimal. I've filed #33 and #34. I'll see if #34 is doable.

Closing this since the workaround is to populate the fake db like @suztomo mentioned.

from fake_cloud_firestore.

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.