mirror of
https://github.com/denoland/deno.git
synced 2024-11-14 16:33:45 -05:00
ae8874b4b2
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>
12 lines
295 B
Text
12 lines
295 B
Text
cover [WILDCARD]/coverage/branch.ts ... 28.571% (4/14)
|
|
4 | } else {
|
|
5 | return false;
|
|
6 | }
|
|
-----|-----
|
|
9 | export function unused(condition: boolean): boolean {
|
|
10 | if (condition) {
|
|
11 | return false;
|
|
12 | } else {
|
|
13 | return true;
|
|
14 | }
|
|
15 | }
|