Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement code coverage heat map (danvk#145)
- Add `--coverage` CLI argument and `coverage` API option to pass coverage JSON file produced by Chrome - Calculate covered mapping ranges' sizes - Implement tree data heat map coloring depending on coverage percent - [ESLint] Require empty line after `const`/`let` - [ESLint] Enable `object-shorthand` - Put code coverage related methods to `coverage.ts` - Add `CannotOpenCoverageFile` and `NoCoverageMatches` errors - Replace `FileSizeMap` with `FileData` so that additional data can be stored along with mapping size - Implement mapping coverages to bundles by comparing coverage URL with bundle name. - Convert coverage ranges (one-line) to per line range to ease matching with mapping ranges - When calculating file sizes first get mapping ranges with sources, then merge consecutive ranges and then calculate bytes - Fix bytes calculation - get bytes length from source ranges' string rather than columns count. One column can have byte length 4 bytes (e.g. 🍰) - Move mapping reference EOL check before invalid mapping column check - Add `rewiremock` to mock dependencies during tests - Add `mappedBytes` value to result Co-authored-by: Nikolay Borzov <[email protected]>
- Loading branch information