diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2022-01-11 21:17:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-11 21:17:25 +0100 |
commit | 13751d9de6bb77daf38ac921e35015c238d06c35 (patch) | |
tree | b158b1206225f64374020a8c338dc951bf2ac2fd /cli/tests/testdata/coverage/multifile/mod.js | |
parent | f3ece7457a2f87787da1d77afdd4ccec7ba03574 (diff) |
fix(coverage): merge coverage ranges (#13334)
Covered ranges were not merged and thus it appeared that some lines
might be uncovered. To fix this I used "v8-coverage" that takes care
of merging the ranges properly. With this change, coverage collected
from a file by multiple entrypoints is now correctly calculated.
I ended up forking https://github.com/demurgos/v8-coverage and adding
"cli/tools/coverage/merge.rs" and "cli/tools/coverage/range_tree.rs".
Diffstat (limited to 'cli/tests/testdata/coverage/multifile/mod.js')
-rw-r--r-- | cli/tests/testdata/coverage/multifile/mod.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cli/tests/testdata/coverage/multifile/mod.js b/cli/tests/testdata/coverage/multifile/mod.js new file mode 100644 index 000000000..b9f8d627a --- /dev/null +++ b/cli/tests/testdata/coverage/multifile/mod.js @@ -0,0 +1,6 @@ +export function test(a) { + if (a) { + return 0; + } + return 1; +} |