add unit tests for core game, bible, share, and stats utilities

146 tests covering evaluateGuess, grading, ordinals, bible data
integrity, section counts, share text generation, and stat
string helpers. Also fixes toOrdinal for 111-113 (was using
>= 11 && <= 13 instead of % 100 check).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
George Powell
2026-02-26 15:02:46 -05:00
parent 03429b17cc
commit e550965086
5 changed files with 974 additions and 1 deletions

View File

@@ -79,7 +79,7 @@ export function getNextGradeMessage(numGuesses: number): string {
}
export function toOrdinal(n: number): string {
if (n >= 11 && n <= 13) {
if (n % 100 >= 11 && n % 100 <= 13) {
return `${n}th`;
}
const mod = n % 10;