MCPcopy
hub / github.com/jestjs/jest / resolveImpl

Method resolveImpl

packages/jest-runtime/src/internals/cjsRequire.ts:62–74  ·  view source on GitHub ↗
(
      moduleName: string,
      resolveOptions?: ResolveOptions,
    )

Source from the content-addressed store, hash-verified

60 options: TransformOptions | undefined,
61 ): NodeJS.Require {
62 const resolveImpl = (
63 moduleName: string,
64 resolveOptions?: ResolveOptions,
65 ) => {
66 const resolved = this.resolve(from.filename, moduleName, resolveOptions);
67 if (
68 resolveOptions?.[JEST_RESOLVE_OUTSIDE_VM_OPTION] &&
69 options?.isInternalModule
70 ) {
71 return createOutsideJestVmPath(resolved);
72 }
73 return resolved;
74 };
75 resolveImpl.paths = (moduleName: string) =>
76 this.resolvePaths(from.filename, moduleName);
77

Callers

nothing calls this directly

Calls 2

resolveMethod · 0.95
createOutsideJestVmPathFunction · 0.90

Tested by

no test coverage detected