summaryrefslogtreecommitdiff
path: root/cli/tools/coverage.rs
AgeCommit message (Collapse)Author
2021-05-17fix: static import permissions in dynamic importsLuca Casonato
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-03-25upgrade: Rust 1.51.0 (#9895)Yusuke Tanaka
2021-03-08fix(coverage): ensure single line functions don't yield false positives (#9717)Casper Beyer
2021-03-01feat(cli): represent type dependencies in info (#9630)Kitson Kelly
Fixes #7927
2021-02-24feat: add "deno coverage" subcommand (#8664)Casper Beyer
This commit adds a new subcommand called "coverage" which can generate code coverage reports to stdout in multiple formats from code coverage profiles collected to disk. Currently this supports outputting a pretty printed diff and the lcov format for interoperability with third-party services and tools. Code coverage is still collected via other subcommands that run and collect code coverage such as "deno test --coverage=<directory>" but that command no longer prints a pretty printed report at the end of a test run with coverage collection enabled. The restrictions on which files that can be reported on has also been relaxed and are fully controllable with the include and exclude regular expression flags on the coverage subcommand. Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2021-02-17Make ModuleSpecifier a type alias, not wrapper struct (#9531)Ryan Dahl
2021-01-29fix(cli/coverage): display mapped instrumentation line counts (#9310)Casper Beyer
2021-01-28fix(coverage): use source maps when printing pretty reports (#9278)Casper Beyer
This commits makes use of source maps and the original source when printing lacking line coverage in the pretty printer. Only the executable lines are checked as before (as non-executable lines will always be ignored anyways). The lines then mapped to the appropriate source line when a source map is present.
2021-01-20fix(coverage): ignore comments (#8639)Casper Beyer
This commit fixes coverage collection by ignoring comments when tallying up line counts.
2021-01-11chore: update copyright to 2021 (#9092)Yusuke Tanaka
2021-01-07fix(coverage): report partial lines as uncovered (#9033)Casper Beyer
2021-01-07fix(coverage): do not store source inline in raw reports (#9025)Casper Beyer
When we were doing single process in-memory reports getting the source from the runtime was practical, but now that we're writing to disk this conflicts with the format tools taking raw v8 coverage dumps expect.
2021-01-04fix(coverage): merge duplicate reports (#8942)Casper Beyer
Merging multiple runs isn't quite right because we rely on a 0 count to signal that a block hasn't been called. Other tools like c8 expect this to be true as-well so we need to do our best to merge coverage files rather than duplicating them.
2020-12-21feat(unstable): record raw coverage into a directory (#8642)Casper Beyer
2020-12-13refactor: deno_runtime crate (#8640)Bartek Iwańczuk
This commit moves Deno JS runtime, ops, permissions and inspector implementation to new "deno_runtime" crate located in "runtime/" directory. Details in "runtime/README.md". Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-11-24feat(test): horizontal separator between disjoint runs of lines (#8484)Valentin Anger
Places a newline between non-consecutive line block in coverage report to improve readability.
2020-11-19refactor(cli): move tooling to cli/tools/ (#8424)Bartek Iwańczuk
This commit moves following tools into a single "tools" module located at "cli/tools/mod.rs": - formatter - linter - test runner - coverage collector - installer - binary upgrader - repl