feat: added rankings

This commit is contained in:
anuraghazra
2020-07-13 19:41:47 +05:30
parent 8e8d7dd64d
commit db49ca7b71
8 changed files with 182 additions and 5 deletions

View File

@@ -0,0 +1,18 @@
require("@testing-library/jest-dom");
const calculateRank = require("../src/calculateRank");
describe("Test calculateRank", () => {
it("should calculate rank correctly", () => {
expect(
calculateRank({
totalCommits: 100,
totalRepos: 5,
followers: 100,
contributions: 61,
stargazers: 400,
prs: 300,
issues: 200,
})
).toStrictEqual({ level: "S+", score: 192.13 });
});
});