PlusVoting
app/features/plus-voting/core/PlusVoting.tsNo overview comment at the top of the file.
- Imports
- no other modules
- Used by
- 1 repository
Functions & values
export function computePassedVoting( results: RawVotingResult[], ): VotingResultWithPassed[]
Unit tests (11)
- auto-passes users with 60% or more
- auto-fails users with 40% or less
- auto-passers pass even when exceeding quota
- middle
- nobody from middle zone passes when auto-passers fill the quota
- tied users at the slot boundary all pass even if it exceeds the quota
- different tiers have different quotas
- exact
- empty results returns empty array
Repositoriesplus-voting/PlusVotingRepository.server.ts
export function computeFreshPlusTiers( results: VotingResultWithPassed[], ): { userId: number; plusTier: number }[]
Unit tests (6)
Repositoriesplus-voting/PlusVotingRepository.server.ts