diff --git a/src/main/matches/free-for-all/index.test.ts b/src/main/matches/free-for-all/index.test.ts index 3430a36..094051b 100644 --- a/src/main/matches/free-for-all/index.test.ts +++ b/src/main/matches/free-for-all/index.test.ts @@ -143,12 +143,15 @@ describe('FreeForAll', () => { match.addPlayer(new Player(i.toString(), 1000)) } - match.calculate(Array.from({ length: 100 }, (_, i) => (i + 1).toString())) - - expect((match.contestants.get('1')! as Player).elo).toBe(1016) - expect((match.contestants.get('50')! as Player).elo).toBe(1000) - expect((match.contestants.get('55')! as Player).elo).toBe(998) - expect((match.contestants.get('100')! as Player).elo).toBe(984) + const results = match.calculate( + Array.from({ length: 100 }, (_, i) => (i + 1).toString()) + ) + + expect((results[0] as Player).elo).toBe(1016) + expect((results[9] as Player).elo).toBe(1013) + expect((results[49] as Player).elo).toBe(1000) + expect((results[54] as Player).elo).toBe(998) + expect((results[99] as Player).elo).toBe(984) }) test('throws error if trying to calculate when min players for match has not been reached', () => {