mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 03:20:33 +08:00
The sidebar already follows the count, so the inbox and the poll don't need to set it too.
12 lines
313 B
TypeScript
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);
|
|
});
|