Files
github-readme-stats/tests/calculateRank.test.ts
rickstaa 1617c3fb22 feat: add initial typescript migration
This commit performs the base changes that are needed to migrate the
codebase to typescript.
2022-10-04 11:43:31 +02:00

19 lines
461 B
TypeScript

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