function _require(currentDirectory, module, esmMode) {
											if (/^\.\.?\//.test(module) || path.isAbsolute(module)) {
												let fn;
												const p = path.isAbsolute(module)
													? module
													: path.join(currentDirectory, module);
												const content = fs.readFileSync(p, "utf-8");

												if (isModule) {
													if (!vm.SourceTextModule)
														throw new Error(
															"Running this test requires '--experimental-vm-modules'.\nRun with 'node --experimental-vm-modules node_modules/jest-cli/bin/jest'."
														);
													let esm = esmCache.get(p);
													if (!esm) {
														esm = new vm.SourceTextModule(content, {
															identifier: `${esmIdentifier}-${p}`,
															url: `${pathToFileURL(p).href}?${esmIdentifier}`,
															context: esmContext,
															initializeImportMeta: (meta, module) => {
																meta.url = pathToFileURL(p).href;
															},
															importModuleDynamically: async (
																specifier,
																module
															) => {
																const normalizedSpecifier =
																	specifier.startsWith("file:")
																		? `./${path.relative(
																				path.dirname(p),
																				fileURLToPath(specifier)
																			)}`
																		: specifier.replace(
																				/https:\/\/test.cases\/path\//,
																				"./"
																			);
																const result = await _require(
																	currentDirectory,
																	normalizedSpecifier,
																	"evaluated"
																);
																return await asModule(result, module.context);
															}
														});
														esmCache.set(p, esm);
													}
													if (esmMode === "unlinked") return esm;
													return (async () => {
														if (esmMode === "unlinked") return esm;
														await esm.link(
															async (specifier, referencingModule) =>
																await asModule(
																	await _require(
																		path.dirname(
																			referencingModule.identifier
																				? referencingModule.identifier.slice(
																						esmIdentifier.length + 1
																					)
																				: fileURLToPath(referencingModule.url)
																		),
																		specifier,
																		"unlinked"
																	),
																	referencingModule.context,
																	true
																)
														);
														// node.js 10 needs instantiate
														if (esm.instantiate) esm.instantiate();
														await esm.evaluate();
														if (esmMode === "evaluated") return esm;
														const ns = esm.namespace;
														return ns.default && ns.default instanceof Promise
															? ns.default
															: ns;
													})();
												}

												if (
													options.target === "web" ||
													options.target === "webworker"
												) {
													fn = vm.runInNewContext(
														"(function(require, module, exports, __dirname, __filename, it, WATCH_STEP, STATS_JSON, STATE, expect, window, self) {" +
															`function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }${
																content
															}\n})`,
														globalContext,
														p
													);
												} else {
													fn = vm.runInThisContext(
														"(function(require, module, exports, __dirname, __filename, it, WATCH_STEP, STATS_JSON, STATE, expect) {" +
															"global.expect = expect;" +
															`function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }${
																content
															}\n})`,
														p
													);
												}
												const m = {
													exports: {}
												};
												fn.call(
													m.exports,
													_require.bind(null, path.dirname(p)),
													m,
													m.exports,
													path.dirname(p),
													p,
													run.it,
													run.name,
													jsonStats,
													state,
													expect,
													globalContext,
													globalContext
												);
												return module.exports;
											} else if (
												testConfig.modules &&
												module in testConfig.modules
											) {
												return testConfig.modules[module];
											}
											return jest.requireActual(module);
										}
@param {string} currentDirectory The directory to resolve relative paths from
@param {string} module The module to require
@param {("unlinked"|"evaluated")} esmMode The mode for ESM module handling
@returns {EXPECTED_ANY} required module
@private