Version
28.0.0-alpha.3
Steps to reproduce
Here is a repo with minimal reproduction: https://github.com/mrazauskas/x-jest-globals
I simply added explicit import to the example from docs (and used TS to trigger transpiration) – https://jestjs.io/docs/next/mock-functions#mocking-partials
Running yarn jest will throw an ReferenceError:

Expected behavior
It should not throw ReferenceError.
Actual behavior
It throws ReferenceError, probably because of transpilation. I also tried transpiling using ts-jest and the error was gone. It seems like only users of babel-jest are affected.
Additional context
No response
Environment
System:
OS: macOS 10.15.7
CPU: (8) x64 Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
Binaries:
Node: 17.3.1 - ~/.nvm/versions/node/v17.3.1/bin/node
Yarn: 1.22.15 - ~/.nvm/versions/node/v17.3.1/bin/yarn
npm: 8.3.0 - ~/.nvm/versions/node/v17.3.1/bin/npm
npmPackages:
jest: ^28.0.0-alpha.3 => 28.0.0-alpha.3