From 4ca77ad84c46ba4afef95f0b6775377d350b7339 Mon Sep 17 00:00:00 2001 From: Casper Beyer Date: Tue, 5 Jan 2021 00:01:21 +0800 Subject: fix(coverage): merge duplicate reports (#8942) 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. --- cli/tests/test_run_run_coverage.out | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'cli/tests/test_run_run_coverage.out') diff --git a/cli/tests/test_run_run_coverage.out b/cli/tests/test_run_run_coverage.out index 15ea230ef..2f18020d3 100644 --- a/cli/tests/test_run_run_coverage.out +++ b/cli/tests/test_run_run_coverage.out @@ -1,16 +1,15 @@ -Check [WILDCARD]/$deno$test.ts +Check [WILDCARD]/tests/$deno$test.ts running 1 tests -test spawn test ... Check [WILDCARD]/run_coverage.ts +test spawn test ... Check [WILDCARD]/tests/run_coverage.ts ok ([WILDCARD]) test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) cover [WILDCARD]/tests/run_coverage.ts ... 100.000% (3/3) cover [WILDCARD]/tests/subdir/mod1.ts ... 35.714% (5/14) - 2 | export function returnsHi() { - 3 | return "Hi"; - 4 | } ------|----- + 5 | export function returnsFoo2() { + 6 | return returnsFoo(); + 7 | } 8 | export function printHello3() { 9 | printHello2(); 10 | } @@ -21,7 +20,10 @@ cover [WILDCARD]/tests/subdir/print_hello.ts ... 25.000% (1/4) 1 | export function printHello() { 2 | console.log("Hello"); 3 | } -cover [WILDCARD]/tests/subdir/subdir2/mod2.ts ... 62.500% (5/8) +cover [WILDCARD]/tests/subdir/subdir2/mod2.ts ... 25.000% (2/8) + 2 | export function returnsFoo() { + 3 | return "Foo"; + 4 | } 5 | export function printHello2() { 6 | printHello(); 7 | } -- cgit v1.2.3