The builder's path
For: Developers can't mock two modules that share a file name, like two index.js files, in different folders.
“Some things are under our control, while others are not under our control.”
Written for this problem
Start with jest users who write manual mocks for modules that have the same file name in different directories. The sources leave these open:
They decide whether a config option or a redesign is acceptable and can say what the internal dependency on current behaviour involves.
Start from what is already published.
Build a small sample repo with two index.js files in different folders and a custom resolver or mock-lookup wrapper that matches manual mocks by full path. Test whether both mocks replace the module next to them and report what breaks.
Write a script that scans a project for duplicate base names among modules that have manual mocks and lists the clashes. Teams could run it to see how often this happens before proposing a config change.
It is solved when: two manual mocks with the same file name in different folders both work, and each one replaces the module next to it.
Routes to a solution
Each route is a different kind of journey, with real people and organisations to contact at each step, starting with those in every country.
Step 1
Build in the open
Publish the code and invite contributors from the community.
Let the people a free tool helps fund its maintainer directly.
Raise and spend money in the open for a community project.
Grants for open source that makes the internet better.
Network of civic tech groups in many countries; find the one near the problem.
Step 2
Fund the maintainers
Sponsors, collectives and open source grants.
Let the people a free tool helps fund its maintainer directly.
Raise and spend money in the open for a community project.
Grants for open source that makes the internet better.
Network of civic tech groups in many countries; find the one near the problem.
Step 3
Get it adopted
Civic tech groups and public bodies take it up.
Y Combinator's free course and co-founder matching.
Raise and spend money in the open for a community project.
Network of civic tech groups in many countries; find the one near the problem.
Volunteer data scientists working with social-sector organisations.
Ideas, sources and tools for this problem, from first interviews to funding.
Official description of how __mocks__ folders and manual mocks are matched, the rule this problem depends on.
Where the maintainers discuss manual mock matching and the breaking-change concern; search for duplicate manual mock warnings.
They decide whether a config option or a redesign is acceptable and can say what the internal dependency on current behaviour involves.
Stewards open-source JavaScript projects and can point to maintainers or teams who have hit the same clash.
Starter prompt
Built from this problem's brief. Paste it into Claude or any AI assistant.
Help me design and build a first working prototype for this problem in Anywhere. Problem: Developers can't mock two modules that share a file name, like two index.js files, in different folders. Who it hurts: Jest users who write manual mocks for modules that have the same file name in different directories The moment it hurts: Jest shows a duplicate manual mock warning, or the mock file is ignored and the real module is used instead. What people do today: Developers rename their non-test files so each name is unique, which the source calls a workaround. Why it is still unsolved: The source says manual mocks are matched by base name across the project. Changing that is a breaking change, and the Jest maintainer says internal Facebook code depends on the current behavior. What solved looks like: Two manual mocks with the same file name in different folders both work, and each one replaces the module next to it. Where: Anywhere First, list what you would need to learn from the people affected before building, as interview questions. Then propose the simplest version that would help, the screens or messages it needs, and the data it would use. Keep it cheap to run, accessible, and respectful of people's privacy. Flag anything you are unsure about instead of guessing.
Talk to the people who live it before you build.
“When a man does not know what harbour he is making for, no wind is the right wind.”
Get a working version in front of people fast.
Using AI is not cheating. Every tool carries the work of the people who made it, and using it well is how knowledge has always moved forward. The thinking, the care for the people who live the problem, and the judgement are still yours.
“The Analytical Engine weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves.”
Open data that fits this problem.
“The first principle is that you must not fool yourself, and you are the easiest person to fool.”
Tools matched to what this problem needs.
“The things we have to learn before we can do them, we learn by doing them.”
Ship it responsibly, and find help and funding.
“Whatever a great person does, others follow.”
यद्यदाचरति श्रेष्ठस्तत्तदेवेतरो जनः
yad yad ācarati śreṣṭhas tat tad evetaro janaḥ
Kit generated with claude-haiku-5-5; every link was checked when it was made. Links go to each provider's own site. Zetema is not paid for any listing.
Take it to someone
Built from this problem's evidence. Fill in the [brackets], make it yours, and send it. Read every line first: it goes out under your name.
Ask someone who knows this problem for 20 minutes.