Missing term in calculation of TOTAL_VALUES. (#2116)

* fix: added missing term in calculation of TOTAL_VALUES.

* fix: fix rank test

* refactor: update code formatting

* refactor: update code formatting

Co-authored-by: rickstaa <rick.staa@outlook.com>
This commit is contained in:
Fabian Joswig 2022-11-18 14:19:04 +00:00 committed by GitHub
parent 1a4e5a6955
commit 26cde6bfe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 3 deletions

View File

@ -70,7 +70,11 @@ function calculateRank({
const RANK_B_VALUE = 100;
const TOTAL_VALUES =
RANK_S_VALUE + RANK_A2_VALUE + RANK_A3_VALUE + RANK_B_VALUE;
RANK_S_VALUE +
RANK_DOUBLE_A_VALUE +
RANK_A2_VALUE +
RANK_A3_VALUE +
RANK_B_VALUE;
// prettier-ignore
const score = (

View File

@ -13,6 +13,6 @@ describe("Test calculateRank", () => {
prs: 300,
issues: 200,
}),
).toStrictEqual({ level: "A+", score: 49.16605417270399 });
).toStrictEqual({ level: "A+", score: 49.25629684876535 });
});
});

View File

@ -22,7 +22,7 @@ const STATS_DATA = {
contributedTo: 2,
rank: {
level: "A+",
score: 51.01013099671447,
score: 50.900829325065935,
},
};