MCPcopy
hub / github.com/webpack/webpack / constructor

Method constructor

test/harness/runner/index.js:79–108  ·  view source on GitHub ↗

* @param {TestRunnerOptions} options test runner options

({
		target,
		outputDirectory,
		testMeta,
		testConfig,
		webpackOptions
	})

Source from the content-addressed store, hash-verified

77 * @param {TestRunnerOptions} options test runner options
78 */
79 constructor({
80 target,
81 outputDirectory,
82 testMeta,
83 testConfig,
84 webpackOptions
85 }) {
86 /** @type {string | string[]} */
87 this.target = target;
88 /** @type {string} */
89 this.outputDirectory = outputDirectory;
90 /** @type {TestConfig} */
91 this.testConfig = testConfig || {};
92 /** @type {TestMeta} */
93 this.testMeta = testMeta || {};
94 /** @type {EXPECTED_ANY} */
95 this.webpackOptions = webpackOptions || {};
96 /** @type {import("../../../lib/config/target").TargetProperties | false} */
97 this._targetProperties = this._resolveTargetProperties();
98 /** @type {boolean} */
99 this._runInNewContext = this.hasWebTarget();
100 /** @type {EXPECTED_ANY} */
101 this._globalContext = this.createBaseGlobalContext();
102 /** @type {EXPECTED_ANY} */
103 this._esmContext = this.createBaseEsmContext();
104 /** @type {EXPECTED_ANY} */
105 this._moduleScope = this.createBaseModuleScope();
106 /** @type {ModuleRunner} */
107 this._moduleRunners = this.createModuleRunners();
108 }
109
110 /**
111 * Whether the target is universal, i.e. its merged platform is neither

Callers

nothing calls this directly

Calls 6

hasWebTargetMethod · 0.95
createBaseEsmContextMethod · 0.95
createBaseModuleScopeMethod · 0.95
createModuleRunnersMethod · 0.95

Tested by

no test coverage detected