Skip to content

Commit

Permalink
Revert "Missing term in calculation of TOTAL_VALUES. (#2116)"
Browse files Browse the repository at this point in the history
This reverts commit 26cde6b.
  • Loading branch information
rickstaa committed Nov 18, 2022
1 parent 26cde6b commit 2a68a4d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/calculateRank.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,7 @@ function calculateRank({
const RANK_B_VALUE = 100;

const TOTAL_VALUES =
RANK_S_VALUE +
RANK_DOUBLE_A_VALUE +
RANK_A2_VALUE +
RANK_A3_VALUE +
RANK_B_VALUE;
RANK_S_VALUE + RANK_A2_VALUE + RANK_A3_VALUE + RANK_B_VALUE;

// prettier-ignore
const score = (
Expand Down
2 changes: 1 addition & 1 deletion tests/calculateRank.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ describe("Test calculateRank", () => {
prs: 300,
issues: 200,
}),
).toStrictEqual({ level: "A+", score: 49.25629684876535 });
).toStrictEqual({ level: "A+", score: 49.16605417270399 });
});
});
2 changes: 1 addition & 1 deletion tests/e2e/e2e.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const STATS_DATA = {
contributedTo: 2,
rank: {
level: "A+",
score: 50.900829325065935,
score: 51.01013099671447,
},
};

Expand Down

0 comments on commit 2a68a4d

Please sign in to comment.