Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
enkoder committed Jun 15, 2024
1 parent 8062538 commit 009e1b3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/lib/ranking.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ test.each([
// Check first placement
expect(points.length).toBe(num);
expect(points[0]).toBe(pointsForFirst);
expect(points[points.length - 1]).toBeLessThanOrEqual(BOTTOM_THRESHOLD[type]);
// Rounding here to bypass floating point errors
expect(Math.round(points[points.length - 1])).toBeLessThanOrEqual(
BOTTOM_THRESHOLD[type],
);

// Check bottom half
let sum = 0;
Expand Down

0 comments on commit 009e1b3

Please sign in to comment.