Mocking - Deepstash

Mocking

Sometimes, when your tested objects have external dependencies, you’ll want to “mock them out.” “Mocking” is when you replace some dependency of your code with your own implementation.

Jest comes with support for mocking from function level all the way to module level mocking.

15

42 reads

CURATED FROM

IDEAS CURATED BY

The idea is part of this collection:

Machine Learning With Google

Learn more about computerscience with this collection

Understanding machine learning models

Improving data analysis and decision-making

How Google uses logic in machine learning

Related collections

Similar ideas to Mocking

Structuring Tests

Jest offers describe function to help structure your tests. Use describe to group together all tests that belong to one functionality. Describes can be nested, if you need that. Other functions you'll commonly u...

Shaping your personal values

Your values will not be fixed; they change throughout your life. While this process happens naturally, you can proactively decide to shape your values.

  • Confront your values to actual experiences. When you notice that you live differently to your valu...

3. Clarify

3. Clarify

When you are clear on what is important to you, there comes an incredible sense of freedom. You no longer live in a world of social comparison. You are running your own race. Goals, big decisions & small habits are surmountable & invigorating because you have a clear picture of ...

Read & Learn

20x Faster

without
deepstash

with
deepstash

with

deepstash

Personalized microlearning

100+ Learning Journeys

Access to 200,000+ ideas

Access to the mobile app

Unlimited idea saving

Unlimited history

Unlimited listening to ideas

Downloading & offline access

Supercharge your mind with one idea per day

Enter your email and spend 1 minute every day to learn something new.

Email

I agree to receive email updates