MCPcopy
hub / github.com/webpack/webpack / runScript

Function runScript

test/test262.spectest.js:685–711  ·  view source on GitHub ↗
(
	context,
	code,
	identifier,
	testFile,
	moduleCache,
	options = {}
)

Source from the content-addressed store, hash-verified

683};
684
685const runScript = async (
686 context,
687 code,
688 identifier,
689 testFile,
690 moduleCache,
691 options = {}
692) => {
693 const script = new vm.Script(code, {
694 filename: identifier,
695 lineOffset: options.lineOffset || 0,
696 columnOffset: options.columnOffset || 0,
697 importModuleDynamically: createImportModuleDynamically(
698 context,
699 testFile,
700 moduleCache
701 )
702 });
703
704 script.runInContext(context, {
705 displayErrors: true
706 });
707
708 await new Promise((resolve) => {
709 setImmediate(resolve);
710 });
711};
712
713const baseDir = path.posix.resolve(test262Dir, "./test/language/");
714

Callers 1

Calls 1

Tested by

no test coverage detected