From 882bdc5048a2cdfad6b9f3eb0cad70438eecdf0f Mon Sep 17 00:00:00 2001 From: Cailyn Sinclair Date: Mon, 23 Nov 2026 10:47:42 -0800 Subject: [PATCH] test: cover 75% advancement cutoff with 42 entrants --- src/containers/CompetitionResults/advancement.test.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/containers/CompetitionResults/advancement.test.ts b/src/containers/CompetitionResults/advancement.test.ts index 93d5526..a4d6738 100644 --- a/src/containers/CompetitionResults/advancement.test.ts +++ b/src/containers/CompetitionResults/advancement.test.ts @@ -168,6 +168,17 @@ describe('stored qualification rules', () => { ).toHaveLength(expected); }); + it('advances exactly the top 31 of 42 competitors at a 75% cutoff', () => { + const advancing = qualifiers(rankedResults(42), { + type: 'percent', + scope: 'average', + value: 75, + }); + + expect(advancing).toHaveLength(31); + expect(advancing.at(-1)?.ranking).toBe(31); + }); + it('caps a configured top 10 at six of eight entrants', () => { expect( qualifiers(rankedResults(8), { type: 'ranking', scope: 'average', value: 10 }),