Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] testing codecov #2808

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ coverage:
round: down
range: "70...100"
status:
project: true
patch: true
# project:
# frontend:
# target: auto
# threshold: 1%
# patch:
# default:
# target: 70%
project:
default:
target: auto
threshold: 1%
patch:
default:
target: 70%

comment:
layout: "reach,diff,flags,files,footer"
Expand Down
13 changes: 13 additions & 0 deletions frontend/src/utilities/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,16 @@
}
return `${str.substring(0, length)}…`;
};

export const testFunction = (x: string, y?: string): string => {
if (y) {
return `${x}-${y}`;

Check warning on line 109 in frontend/src/utilities/string.ts

View check run for this annotation

Codecov / codecov/patch

frontend/src/utilities/string.ts#L108-L109

Added lines #L108 - L109 were not covered by tests
}
return x;

Check warning on line 111 in frontend/src/utilities/string.ts

View check run for this annotation

Codecov / codecov/patch

frontend/src/utilities/string.ts#L111

Added line #L111 was not covered by tests
};

export const testingCodecov = (): string => {
const first = testFunction('a');
const second = testFunction('a', 'b');
return testFunction(first, second);

Check warning on line 117 in frontend/src/utilities/string.ts

View check run for this annotation

Codecov / codecov/patch

frontend/src/utilities/string.ts#L115-L117

Added lines #L115 - L117 were not covered by tests
};
Loading