-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli/coverage): display mapped instrumentation line counts (#9310)
- Loading branch information
1 parent
013b8fe
commit 9965fc8
Showing
11 changed files
with
179 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// This entire interface should be completely ignored by the coverage tool. | ||
export interface Complex { | ||
// These are comments. | ||
foo: string; | ||
|
||
// But this is a stub, so this isn't really documentation. | ||
bar: string; | ||
|
||
// Really all these are doing is padding the line count. | ||
baz: string; | ||
} | ||
|
||
export function complex( | ||
foo: string, | ||
bar: string, | ||
baz: string, | ||
): Complex { | ||
return { | ||
foo, | ||
bar, | ||
baz, | ||
}; | ||
} | ||
|
||
export function unused( | ||
foo: string, | ||
bar: string, | ||
baz: string, | ||
): Complex { | ||
return complex( | ||
foo, | ||
bar, | ||
baz, | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Check [WILDCARD]/tests/$deno$test.ts | ||
running 1 tests | ||
test complex ... ok ([WILDCARD]) | ||
|
||
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out ([WILDCARD]) | ||
|
||
cover [WILDCARD]/tests/subdir/complex.ts ... 50.000% (10/20) | ||
25 | export function unused( | ||
26 | foo: string, | ||
27 | bar: string, | ||
28 | baz: string, | ||
-----|----- | ||
30 | return complex( | ||
31 | foo, | ||
32 | bar, | ||
33 | baz, | ||
34 | ); | ||
35 | } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { complex } from "./subdir/complex.ts"; | ||
|
||
Deno.test("complex", function () { | ||
complex("foo", "bar", "baz"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.