mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-03 00:27:30 -05:00
Move app to apps/web-react in pnpm workspace layout
This commit is contained in:
20
apps/web-react/app/hooks/useRecentlyReportedWeapons.test.ts
Normal file
20
apps/web-react/app/hooks/useRecentlyReportedWeapons.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 { recentlyReportedWeaponsPersisted } from "./useRecentlyReportedWeapons";
|
||||
|
||||
describe("recentlyReportedWeaponsPersisted", () => {
|
||||
test("round-trips", () => {
|
||||
assertRoundTrips(recentlyReportedWeaponsPersisted, [[], [0, 10, 8000]]);
|
||||
});
|
||||
|
||||
test("malformed values decode to the default", () => {
|
||||
assertDecodesToDefault(recentlyReportedWeaponsPersisted, [
|
||||
"not json",
|
||||
"[99999]",
|
||||
'["0"]',
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user