feat: distinguish fish by visual family
CI / backend-and-migrations (push) Canceled after 0s
CI / astro-build (push) Canceled after 0s
CI / dependency-audit (push) Canceled after 0s
CI / compose-e2e (push) Canceled after 0s

This commit is contained in:
ik
2026-09-12 15:28:24 +07:00
parent b71e4a22a2
commit c3e847c249
6 changed files with 41 additions and 8 deletions
+8
View File
@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
import test from "node:test";
import { activityLevel, plural } from "../../src/lib/presentation.ts";
import { fishVisualFamily } from "../../src/lib/fish-visuals.ts";
test("activity levels share one complete 0-100 scale", () => {
assert.deepEqual(
@@ -17,3 +18,10 @@ test("Russian plural forms cover common and exceptional endings", () => {
["точек", "точка", "точки", "точек", "точек", "точка", "точки", "точек"],
);
});
test("fish visual families follow body type instead of a name hash", () => {
assert.deepEqual(
["Щука", "Озёрная форель", "Карп", "Окунь", "Сом", "Угорь", "Палтус", "Треска", "Неизвестная рыба"].map(fishVisualFamily),
["pike", "salmonid", "cyprinid", "perch", "catfish", "eel", "flatfish", "marine", "generic"],
);
});