---
title: "Discussion on \"How To Mock Only One Function From A Module In Jest\" | Hashnode"
description: "Discussion on \"How To Mock Only One Function From A Module In Jest\". Mocking dependencies of your code is one of the fundamental aspects to software testing that allows developers to gain control over data flows and behaviour of the code. As a JavaScript testing framework, Jest has an extensive collections of APIs tha..."
url: "https://hashnode.com/posts/how-to-mock-only-one-function-from-a-module-in-jest/612a4d7f2858872661b99972"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How To Mock Only One Function From A Module In Jest](https://chakshunyu.hashnode.dev/how-to-mock-only-one-function-from-a-module-in-jest?utm_source=hashnode&utm_medium=feed)

Mocking dependencies of your code is one of the fundamental aspects to software testing that allows developers to gain control over data flows and behaviour of the code. As a JavaScript testing framework, Jest has an extensive collections of APIs tha...

Aug 28, 2021 · 6 min read · chakshunyu.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#testing](https://hashnode.com/tag/testing)
-   [#jest](https://hashnode.com/tag/jest)

## Written by

[Chak Shun Yu](https://hashnode.com/@keraito)

@keraito

  
[View profile](https://hashnode.com/@keraito)

React, Storybook and Node enthusiast.

Lifelong learner working as a software engineer. React frontend developer, former Storybook maintainer, and technical writer about React, testing, and career.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
