MCPcopy
hub / github.com/webpack/webpack / templateModule

Function templateModule

test/HtmlParser.unittest.js:296–317  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

294 * @returns {EXPECTED_ANY} module double with dependency sets + diagnostics
295 */
296 const templateModule = () => {
297 /** @type {EXPECTED_OBJECT[]} */
298 const warnings = [];
299 /** @type {EXPECTED_OBJECT[]} */
300 const errors = [];
301 return {
302 resource: path.resolve(__dirname, "index.html"),
303 buildInfo: /** @type {Record<string, EXPECTED_ANY>} */ ({
304 fileDependencies: new Set(),
305 contextDependencies: new Set(),
306 missingDependencies: new Set()
307 }),
308 addWarning(/** @type {EXPECTED_OBJECT} */ warning) {
309 warnings.push(warning);
310 },
311 addError(/** @type {EXPECTED_OBJECT} */ error) {
312 errors.push(error);
313 },
314 warnings,
315 errors
316 };
317 };
318
319 it("is a no-op without a template option", () => {
320 const parser = new HtmlParser({});

Callers 1

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected