refactor(variants): drop unused isWinner flag on variant results

Each variant emitted isWinner:false and the calculator set winner.isWinner
=true, but the UI marks the winner via variantId===winnerId, never the
flag. Only one test read it. Removed from the 6 variant returns, the empty
result, and the calculator.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kenearos 2026-07-07 11:45:15 +02:00
parent cb46e8fb04
commit 88cc0553f6
3 changed files with 9 additions and 19 deletions

View file

@ -844,7 +844,6 @@ runner.test('Winner: klarer Sieger mit weekdays + 1 Fr', (t) => {
{ date: new Date('2025-11-04T12:00:00'), share: 1.0 } // Di
];
const result = calc.calculateMonthlyBonus(duties, false);
t.assertTrue(result.winner.isWinner, 'winner.isWinner=true');
t.assertEqual(result.allResults.length, 3, '3 Varianten im allResults');
t.assertTrue(result.totalBonus > 0, 'Bonus > 0');
});