mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-02 16:20:36 -05:00
Move app to apps/web-react in pnpm workspace layout
This commit is contained in:
20
apps/web-react/app/hooks/useUnseenFriendRequests.test.ts
Normal file
20
apps/web-react/app/hooks/useUnseenFriendRequests.test.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { describe, test } from "vitest";
|
||||
import {
|
||||
assertDecodesToDefault,
|
||||
assertRoundTrips,
|
||||
} from "~/modules/persisted-state/persisted-state-test-utils";
|
||||
import { seenFriendRequestsPersisted } from "./useUnseenFriendRequests";
|
||||
|
||||
describe("seenFriendRequestsPersisted", () => {
|
||||
test("round-trips", () => {
|
||||
assertRoundTrips(seenFriendRequestsPersisted, [[], [3, 2, 1]]);
|
||||
});
|
||||
|
||||
test("malformed values decode to the default", () => {
|
||||
assertDecodesToDefault(seenFriendRequestsPersisted, [
|
||||
"not json",
|
||||
'{"a":1}',
|
||||
'["a"]',
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user