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
The idea is part of this collection:
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
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...
Your values will not be fixed; they change throughout your life. While this process happens naturally, you can proactively decide to shape your values.
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.
I agree to receive email updates