mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-08-06 04:55:15 -05:00
22 lines
561 B
TypeScript
22 lines
561 B
TypeScript
import { describe, it } from "vitest";
|
|
import {
|
|
assertDecodesToDefault,
|
|
assertRoundTrips,
|
|
} from "~/modules/search-params/search-params-test-utils";
|
|
import { adminSearchParams } from "./admin-search-params";
|
|
|
|
describe("adminSearchParams", () => {
|
|
it("round-trips", () => {
|
|
assertRoundTrips(adminSearchParams, {
|
|
friendCode: ["1234-5678-9012", "SW-1234-5678-9012", "123456789012"],
|
|
});
|
|
});
|
|
|
|
it("garbage decodes to default", () => {
|
|
assertDecodesToDefault(adminSearchParams, "friendCode", [
|
|
["not-a-friend-code"],
|
|
["1234-5678"],
|
|
]);
|
|
});
|
|
});
|