Me estoy burlando de un componente usando jest.mock("../path/to/file") .
Si ese componente simulado se mueve, Webstorm arreglará todas mis importaciones. Pero no arreglará el camino en el simulacro. ¡Estoy tratando de ver si hay alguna manera de resolver esto!
Algo como...
import Component from "../../Component" const pathToComponent = pathToFile(Component) // returns "../../Component", but this will change if the file moves.¿Existe tal función? Parece que podría ser demasiado meta...
(por cierto, incluir la importación real al componente no parece romper la burla de Jest)