github-readme-stats/tests/calculateRank.test.js
Fabian Joswig 26cde6bfe9
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>
2022-11-18 15:19:04 +01:00

19 lines
464 B
JavaScript

import "@testing-library/jest-dom";
import { calculateRank } from "../src/calculateRank.js";
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: "A+", score: 49.25629684876535 });
});
});