mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-10-02 08:07:40 -05:00
21 lines
593 B
TypeScript
21 lines
593 B
TypeScript
import { describe, test } from "vitest";
|
|
import {
|
|
assertDecodesToDefault,
|
|
assertRoundTrips,
|
|
} from "~/modules/search-params/search-params-test-utils";
|
|
import { scannerSearchParams } from "./scanner-search-params";
|
|
|
|
describe("scannerSearchParams", () => {
|
|
test("round-trips", () => {
|
|
assertRoundTrips(scannerSearchParams, {
|
|
tab: ["live", "screenshot", "vod"],
|
|
inspect: ["1723456789012-abc123", null],
|
|
telemetry: [true, false],
|
|
});
|
|
});
|
|
|
|
test("malformed values decode to defaults", () => {
|
|
assertDecodesToDefault(scannerSearchParams, "tab", [["garbage"], ["LIVE"]]);
|
|
});
|
|
});
|