function _require(module, esmMode) {
								if (module.startsWith("./")) {
									const p = path.join(outputDirectory, module);
									const content = fs.readFileSync(p, "utf-8");
									if (p.endsWith(".mjs")) {
										let esm;
										try {
											esm = new vm.SourceTextModule(content, {
												identifier: p,
												context: esmContext,
												initializeImportMeta: (meta, module) => {
													meta.url = pathToFileURL(p).href;
												},
												importModuleDynamically: async (specifier, module) => {
													const result = await _require(specifier, "evaluated");
													return await asModule(result, module.context);
												}
											});
											cleanups.push(() => (esmContext.it = undefined));
										} catch (err) {
											console.log(err);
											err.message += `\nwhile parsing ${p}`;
											throw err;
										}
										if (esmMode === "unlinked") return esm;
										return (async () => {
											await esm.link(
												async (specifier, module) =>
													await asModule(
														await _require(specifier, "unlinked"),
														module.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;
										})();
									}
									const fn = vm.runInThisContext(
										"(function(require, module, exports, __dirname, __filename, it, expect) {" +
											"global.expect = expect;" +
											`function nsObj(m) { Object.defineProperty(m, Symbol.toStringTag, { value: "Module" }); return m; }${
												content
											}\n})`,
										p
									);
									const m = {
										exports: {},
										webpackTestSuiteModule: true
									};
									fn.call(
										m.exports,
										_require,
										m,
										m.exports,
										outputDirectory,
										p,
										_it,
										expect
									);
									return m.exports;
								}
								return require(module);
							}
@param {string} module a module
@param {"evaluated" | "unlinked"=} esmMode esm mode
@returns {EXPECTED_ANY} required module
@private