MCPcopy
hub / github.com/webpack/webpack / run

Method run

test/harness/runner/index.js:706–731  ·  test/harness/runner/index.js::TestRunner.run
()

Source from the content-addressed store, hash-verified

704 };
705
706 const run = async () => {
707 class="cm">// Link module dependencies
708 if (major === 10) {
709 if (
710 /** @type {EXPECTED_ANY} */ (esm).linkingStatus ===
711 ESModuleStatus.Unlinked
712 ) {
713 await link();
714 }
715 if (
716 /** @type {EXPECTED_ANY} */ (esm).linkingStatus ===
717 ESModuleStatus.Linked
718 ) {
719 /** @type {EXPECTED_ANY} */ (esm).instantiate();
720 }
721 } else if (esm.status === ESModuleStatus.Unlinked) {
722 await link();
723 }
724
725 class="cm">// Evaluate the module
726 await esm.evaluate();
727 if (esmReturnStatus === ESModuleStatus.Evaluated) return esm;
728
729 const ns = /** @type {EXPECTED_ANY} */ (esm.namespace);
730 return ns.default && ns.default instanceof Promise ? ns.default : ns;
731 };
732
733 return run();
734 };

Callers 15

buildBatchFunction · 0.45
runWebpackFunction · 0.45
runCompilerFunction · 0.45
runFunction · 0.45
describeCasesFunction · 0.45
runCompilerFunction · 0.45
describeCasesFunction · 0.45

Calls 1

evaluateMethod · 0.80

Tested by 10

runCompilerFunction · 0.36
compileFunction · 0.36
compileFunction · 0.36
createCompilerFunction · 0.36
compileFunction · 0.36
callbackFunction · 0.36
runFunction · 0.36
runCompilerFunction · 0.36
compileFunction · 0.36
runCompilerAsyncFunction · 0.36