(from: string, to?: string)
| 384 | } |
| 385 | |
| 386 | requireInternalModule<T = unknown>(from: string, to?: string): T { |
| 387 | if (to) { |
| 388 | const require = nativeModule.createRequire(from); |
| 389 | if (INTERNAL_MODULE_REQUIRE_OUTSIDE_OPTIMIZED_MODULES.has(to)) { |
| 390 | return require(to); |
| 391 | } |
| 392 | const outsideJestVmPath = decodePossibleOutsideJestVmPath(to); |
| 393 | if (outsideJestVmPath) { |
| 394 | return require(outsideJestVmPath); |
| 395 | } |
| 396 | } |
| 397 | |
| 398 | return this.requireModule<T>(from, to, { |
| 399 | isInternalModule: true, |
| 400 | supportsDynamicImport: runtimeSupportsVmModules, |
| 401 | supportsExportNamespaceFrom: false, |
| 402 | supportsStaticESM: false, |
| 403 | supportsTopLevelAwait: false, |
| 404 | }); |
| 405 | } |
| 406 | |
| 407 | requireActual<T = unknown>(from: string, moduleName: string): T { |
| 408 | if (FRAMEWORK_SINGLETON_MODULES.has(moduleName)) { |
no test coverage detected