fix: clarify blocked source status
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import assert from "node:assert/strict";
|
||||
import test from "node:test";
|
||||
|
||||
import { activityLevel, freshnessStatus, plural } from "../../src/lib/presentation.ts";
|
||||
import { activityLevel, freshnessStatus, plural, sourceStatusLabel } from "../../src/lib/presentation.ts";
|
||||
import { fishVisualFamily } from "../../src/lib/fish-visuals.ts";
|
||||
import { tackleVisualKind, tackleVisualTone } from "../../src/lib/tackle-visuals.ts";
|
||||
import { waterbodyVisual } from "../../src/lib/waterbody-visuals.ts";
|
||||
@@ -30,6 +30,12 @@ test("freshness status is explicit and deterministic around the 48-hour boundary
|
||||
assert.equal(freshnessStatus(null, now), "unknown");
|
||||
});
|
||||
|
||||
test("source status makes a blocked provider explicit", () => {
|
||||
assert.equal(sourceStatusLabel("temporarily_limited"), "Источник временно ограничен");
|
||||
assert.equal(sourceStatusLabel("healthy"), "Актуален");
|
||||
assert.equal(sourceStatusLabel("unexpected"), "Состояние не определено");
|
||||
});
|
||||
|
||||
test("fish visual families follow body type instead of a name hash", () => {
|
||||
assert.deepEqual(
|
||||
["Щука", "Озёрная форель", "Карп", "Окунь", "Сом", "Угорь", "Палтус", "Треска", "Неизвестная рыба"].map(fishVisualFamily),
|
||||
|
||||
Reference in New Issue
Block a user