1 / 5 · Welcome

Every problem is a question the world is asking.

Zetema (ζήτημα, Greek for “a thing sought”) gathers real problems people want solved, from public pages around the world. Builders find something worth building, and anyone living with a problem can share it, no coding needed.

← Back to the problem

The builder's path

Six steps from this problem to its solution.

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.”
Epictetus · Enchiridion 1 (tr. W. A. Oldfather)

Written for this problem

The path

  1. Ask the people who live it

    Start with jest users who write manual mocks for modules that have the same file name in different directories. The sources leave these open:

    • How do Jest users who hit this problem want node module mocks to be placed, given the shared root __mocks__ folder?
    • Would a config option that switches the matching rule be enough for teams, or do they need a full redesign?
    • How many projects have hit this clash, and how do they currently work around it?
  2. Talk to Jest maintainers on the Jest GitHub repository

    They decide whether a config option or a redesign is acceptable and can say what the internal dependency on current behaviour involves.

    • OpenJS Foundation: Stewards open-source JavaScript projects and can point to maintainers or teams who have hit the same clash.
  3. Get the data

    Start from what is already published.

    • Jest manual mocks documentation ↗ · Official description of how __mocks__ folders and manual mocks are matched, the rule this problem depends on.
    • Jest GitHub issues ↗ · Where the maintainers discuss manual mock matching and the breaking-change concern; search for duplicate manual mock warnings.
  4. Prototype: Jest config prototype for path-scoped manual mocks

    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.

  5. Prototype: Compatibility checker for existing Jest projects

    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.

  6. Test it with the people affected

    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

Six ways to take this forward

Each route is a different kind of journey, with real people and organisations to contact at each step, starting with those in every country.

  1. Step 1

    Build in the open

    Publish the code and invite contributors from the community.

  2. Step 2

    Fund the maintainers

    Sponsors, collectives and open source grants.

  3. Step 3

    Get it adopted

    Civic tech groups and public bodies take it up.

What this problem needs

Ideas, sources and tools for this problem, from first interviews to funding.

  • Web
  • Open data

Ideas to explore

  • Idea 1Jest config prototype for path-scoped manual mocksBuild 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.
  • Idea 2Compatibility checker for existing Jest projectsWrite 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.

Specific to this problem

  • Jest manual mocks documentation ↗

    Official description of how __mocks__ folders and manual mocks are matched, the rule this problem depends on.

  • Jest GitHub issues ↗

    Where the maintainers discuss manual mock matching and the breaking-change concern; search for duplicate manual mock warnings.

Talk to first

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.
  1. Understand it

    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.”
    Seneca · Letters to Lucilius 71.3 (tr. R. M. Gummere)
  2. Prototype with AI

    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.”
    Ada Lovelace · Notes on Menabrea's Sketch of the Analytical Engine, Note A (1843)
  3. Find the data

    Open data that fits this problem.

    “The first principle is that you must not fool yourself, and you are the easiest person to fool.”
    Richard Feynman · Cargo Cult Science, Caltech commencement address (1974)
  4. Build it

    Tools matched to what this problem needs.

    “The things we have to learn before we can do them, we learn by doing them.”
    Aristotle · Nicomachean Ethics II.1 (tr. W. D. Ross)
  5. Launch and get support

    Ship it responsibly, and find help and funding.

    “Whatever a great person does, others follow.”

    यद्यदाचरति श्रेष्ठस्तत्तदेवेतरो जनः

    yad yad ācarati śreṣṭhas tat tad evetaro janaḥ

    Bhagavad Gītā · 3.21

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

Ready to send, with the sources in place

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.