Skip to content

Commit

Permalink
chore(automated): Lint commit and format
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Aug 22, 2024
1 parent 38d3aac commit 9d87119
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions tests/src/scripts/coverage.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ LF:12
LH:12
end_of_record
`);
const result: stepResponse = getCoverage(oldCoverage, COVERAGE_DIR);
const result: stepResponse = getCoverage(oldCoverage, COVERAGE_DIR, "90");

expect(result).toEqual(
expect.objectContaining({
Expand Down Expand Up @@ -64,7 +64,8 @@ LF:12
LH:12
end_of_record
`),
"coverage"
"coverage",
"90"
);

expect(result.output.includes(" (🔻 down from")).toBe(true);
Expand Down Expand Up @@ -92,7 +93,8 @@ LF:12
LH:0
end_of_record
`),
COVERAGE_DIR
COVERAGE_DIR,
"90"
);
expect(result.output.includes(" (⬆️ up from")).toBe(true);

Expand Down Expand Up @@ -120,7 +122,8 @@ LF:12
LH:10
end_of_record
`),
COVERAGE_DIR
COVERAGE_DIR,
"90"
);
expect(result.output.includes(" (no change)")).toBe(true);

Expand All @@ -130,7 +133,7 @@ end_of_record
test("no old coverage", () => {
process.chdir("tests/pass_repo");

const result: stepResponse = getCoverage(undefined, COVERAGE_DIR);
const result: stepResponse = getCoverage(undefined, COVERAGE_DIR, "90");
expect(result.output.includes(" (🔻 down from 95%)")).toBe(false);
expect(result.output.includes(" (⬆️ up from 5%)")).toBe(false);
expect(result.output.includes(" (no change)")).toBe(false);
Expand All @@ -141,7 +144,7 @@ test("no old coverage", () => {
test("fail", () => {
process.chdir("tests/fail_repo");
try {
const result: stepResponse = getCoverage(undefined, COVERAGE_DIR);
const result: stepResponse = getCoverage(undefined, COVERAGE_DIR, "90");
} catch (error) {
expect(error).toBeInstanceOf(Error);
}
Expand Down

0 comments on commit 9d87119

Please sign in to comment.