Skip to content

Commit ab8e42a

Browse files
Refactor: Adjust random score ranges in integration tests (#21)
Co-authored-by: Cursor Agent <[email protected]>
1 parent abbd80d commit ab8e42a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/integration.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,12 @@ describe('Integration Tests - Complete Workflows', () => {
510510
const tournamentData = generateTournamentWithByes(teams, 'top-seeds');
511511
const gracket = new Gracket(container, { src: tournamentData });
512512

513-
// Rapid score updates
513+
// Rapid score updates - ensure no ties by using non-overlapping ranges
514514
for (let i = 0; i < 100; i++) {
515515
tournamentData[0].forEach((game, gameIdx) => {
516516
if (game.length === 2) {
517-
gracket.updateScore(0, gameIdx, 0, Math.floor(Math.random() * 50) + 80);
518-
gracket.updateScore(0, gameIdx, 1, Math.floor(Math.random() * 50) + 60);
517+
gracket.updateScore(0, gameIdx, 0, Math.floor(Math.random() * 30) + 100); // 100-129
518+
gracket.updateScore(0, gameIdx, 1, Math.floor(Math.random() * 30) + 60); // 60-89
519519
}
520520
});
521521
}

0 commit comments

Comments
 (0)