feat: add "deno coverage" subcommand (#8664)

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>
This commit is contained in:
Casper Beyer 2021-02-24 22:27:51 +08:00 committed by GitHub
parent f6a80f34d9
commit ae8874b4b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 885 additions and 433 deletions

View file

@ -1,5 +0,0 @@
import { complex } from "./subdir/complex.ts";
Deno.test("complex", function () {
complex("foo", "bar", "baz");
});