diff options
author | Taku Amano <taku@taaas.jp> | 2024-10-31 23:20:26 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 23:20:26 +0900 |
commit | 50ea707b58dff85b479905ebbeef866c95bc3cad (patch) | |
tree | a894e383d41e55b1d32771baf9ea70f6a1111b9d /tests/testdata/coverage/complex.ts | |
parent | 56f25af2c7b8b158ae21271c129ea0f0bf3c258f (diff) |
fix(coverage): exclude comment lines from coverage reports (#25939)
Diffstat (limited to 'tests/testdata/coverage/complex.ts')
-rw-r--r-- | tests/testdata/coverage/complex.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/testdata/coverage/complex.ts b/tests/testdata/coverage/complex.ts index d128b5437..316986cd2 100644 --- a/tests/testdata/coverage/complex.ts +++ b/tests/testdata/coverage/complex.ts @@ -1,3 +1,8 @@ +/** + * @module + * Complex module + */ + // This entire interface should be completely ignored by the coverage tool. export interface Complex { // These comments should be ignored. @@ -19,6 +24,7 @@ function dependency( bar: string, baz: string, ): Complex { + // inline comment in tested function return { foo, bar, @@ -34,6 +40,9 @@ export function complex( bar: string, baz: string, ): Complex { + /* + * block comment in tested function + */ return dependency( foo, bar, @@ -48,6 +57,7 @@ export function unused( bar: string, baz: string, ): Complex { + // inline comment in untested function return complex( foo, bar, @@ -62,6 +72,9 @@ export const π = Math.PI; // And same applies for this one, this one is unused and will show up in // lacking coverage. export function ƒ(): number { + /* + * block comment in untested function + */ return ( 0 ); |