mirror of
https://seed.radicle.dev/rad:z4D5UCArafTzTQpDZNQRuqswh3ury.git
synced 2026-10-18 19:10:45 +08:00
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.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
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);
|
||||
});
|
||||
Reference in New Issue
Block a user