Something went wrong. Try again.
Monorepo for Tangled tangled.org
Something went wrong. Try again.
TypeScript
at sl/gitmirror
123456789101112131415161718import { describe, expect, it } from "vitest";import { loopbackClientId, loopbackScope } from "$lib/oauth-client-metadata";
describe("loopbackClientId", () => { it("keeps the authorize url within chromium's referrer length limit", () => { const url = new URL("https://tngl.sh/oauth/authorize"); url.searchParams.set( "client_id", loopbackClientId("http://127.0.0.1:5173/oauth/callback", loopbackScope) ); url.searchParams.set( "request_uri", `urn:ietf:params:oauth:request_uri:req-${"0".repeat(32)}` ); expect(url.href.length).toBeLessThanOrEqual(4096); });});