Files
radicle-explorer/tests/unit/notificationCount.test.ts
T
Rūdolfs Ošiņš 05b6e01dc8 Set the dock badge in one place
The sidebar already follows the count, so the inbox and the poll don't need to set it too.
2026-10-01 18:20:25 +02:00

12 lines
313 B
TypeScript

import { expect, test } from "vitest";
import { badgeCount } from "@app/lib/notificationCount.svelte";
test.each([
[3, true, 3],
[0, true, undefined],
[3, false, undefined],
])("%j notifications with the badge on %j show %j", (count, on, expected) => {
expect(badgeCount(count, on)).toBe(expected);
});