github-readme-stats/tests/calculateRank.test.js
2020-07-13 19:41:47 +05:30

19 lines
452 B
JavaScript

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 });
});
});