gaearon/jest-mock-issue-repro — explained in plain English
Analysis updated 2026-07-18 · repo last pushed 2017-03-05
Reproduce a Jest mock bug by running the included test file.
Confirm a shared testing glitch by comparing your own mock issues to this example.
Provide a minimal test case to help Jest maintainers diagnose and fix the problem.
| gaearon/jest-mock-issue-repro | 0xmukesh/docusaurus-tutorial | a15n/andrewscheuermann | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | JavaScript | JavaScript | JavaScript |
| Last pushed | 2017-03-05 | 2021-12-27 | 2015-01-11 |
| Maintenance | Dormant | Dormant | Dormant |
| Setup difficulty | easy | easy | moderate |
| Complexity | 1/5 | 2/5 | 1/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
No gotchas, just clone, run npm install, and npm test to see the bug occur.
This repository, created by Dan Abramov, exists to reproduce a specific bug in Jest's mock functionality. Jest is a popular testing tool for JavaScript applications, and "mocks" are a way to simulate parts of your code, like a function or a module, so you can test how other parts behave without relying on the real thing. When a developer runs into unexpected behavior with testing tools, they often create a minimal example like this to clearly show the problem to the people who maintain the tool. The entire project is essentially a stripped-down test case. There is no user-facing application or product here. Instead, it contains the bare minimum setup needed to trigger the issue: a configuration file, a test file named index.test.js, and the necessary dependencies. By keeping it this minimal, anyone can quickly download it, run the standard npm install and npm test commands, and see the exact problem occur on their own machine without any distracting extra code. This kind of repository is primarily meant for the maintainers of the testing tool and other developers who might be experiencing the same glitch. For example, if a developer finds that their mocked functions are not resetting correctly between tests, causing false failures or unexpected passes, they might look at this reproduction to confirm they are not alone. It serves as a shared, tangible reference point for a conversation about how to fix the underlying tool. The notable thing about this project is simply how little there is to it. It is built to be as small as possible to prove a point. The creator didn't add any extensive documentation or explanations beyond directing the reader to the test file itself. The entire value lies in the code inside that single test file, which demonstrates the exact steps needed to make the testing glitch happen.
A minimal repository created to reproduce a specific bug in Jest's mock functionality, containing only the bare minimum code needed to trigger the issue.
Mainly JavaScript. The stack also includes JavaScript, Jest, Node.js.
Dormant — no commits in 2+ years (last push 2017-03-05).
No license information is provided in this repository.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.