| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9098585 commit 02fbff4
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -86,6 +86,7 @@ class TestCoverage { | |||
| 86 | 86 | ||
| 87 | 87 | #sourceLines = new SafeMap(); | |
| 88 | 88 | #typeScriptLines = new SafeSet(); | |
| 89 | + #skipCache = new SafeMap(); | ||
| 89 | 90 | ||
| 90 | 91 | getLines(fileUrl, source) { | |
| 91 | 92 | // Split the file source into lines. Make sure the lines maintain their | |
@@ -535,6 +536,14 @@ class TestCoverage { | |||
| 535 | 536 | } | |
| 536 | 537 | ||
| 537 | 538 | shouldSkipFileCoverage(url) { | |
| 539 | + const cached = this.#skipCache.get(url); | ||
| 540 | + if (cached !== undefined) return cached; | ||
| 541 | + const result = this.#computeShouldSkipFileCoverage(url); | ||
| 542 | + this.#skipCache.set(url, result); | ||
| 543 | + return result; | ||
| 544 | + } | ||
| 545 | + | ||
| 546 | + #computeShouldSkipFileCoverage(url) { | ||
| 538 | 547 | // This check filters out core modules, which start with 'node:' in | |
| 539 | 548 | // coverage reports, as well as any invalid coverages which have been | |
| 540 | 549 | // observed on Windows. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments