()
| 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({}); |
no test coverage detected