- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.6k
Closed
unrs/unrs-resolver
#171Labels
Description
Version
30.0.3
Steps to reproduce
- Clone https://github.com/G-Rath/jest-runner-bug
- Run yarn install
- cdinto- foo/bar/dip
- Run npx jest
Alternatively, see the CI: https://github.com/G-Rath/jest-runner-bug/blob/main/.github/workflows/ci.yml & https://github.com/G-Rath/jest-runner-bug/actions/runs/15981985791/job/45078225921
Expected behavior
Jest to be happy
Actual behavior
Jest errors about "Runner is not a constructor"
Additional context
This was found via jest-community/jest-runner-eslint#291 where I've already done some digging, and spoken to @JounQin about - originally we were not sure if this is actually something Jest officially supports, but now that I know it only seems to happen on Yarn and when nested more than two directories I think it's clearly a bug.
The issue seems to lie with jest-resolve and/or unrs-resolver - see this comment for the work I've done so far
Environment
System:
    OS: Linux 6.6 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
    CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13700H
  Binaries:
    Node: 20.19.0 - ~/.nodenv/versions/20.19.0/bin/node
    Yarn: 1.22.22 - ~/.nodenv/versions/20.19.0/bin/yarn
    npm: 10.8.2 - ~/.nodenv/versions/20.19.0/bin/npm