To Mock or Not to Mock, That is The Question

Photo by James Harrison on Unsplash

Mocking dependencies of your code is one of the fundamental aspects of software testing. It’s a powerful method that allows developers to gain control over a certain part of your code and create an isolated environment for your test if done too much. This will make your tests less reliable and create a false sense of security, which is exactly not what we want.

--

--

--

Lifelong learner working as a frontend engineer. React. Self Development and Reflection. Testing. Technical Blogging.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Write a static code analysis tool for detecting race conditions

16 the Best Python IDEs and Code Editors in 2022

R Concole Code Writing

The 6 Best Free and Open Source Fleet Management Software Programs

When a product name redefines the product

Create Log-Based Metrics in Google Cloud and Gain Valuable Insights

Instruments of an airplane cockpit.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Chak Shun Yu

Chak Shun Yu

Lifelong learner working as a frontend engineer. React. Self Development and Reflection. Testing. Technical Blogging.

More from Medium

An Overview of Cache & its Types

Get Out of Jail Design Pattern

Principle of Least Astonishment

TypeScript Interview Questions