Refactor Study Desk application structure

This commit is contained in:
Elijah 2026-08-07 19:31:23 -07:00
parent faaccf8a7e
commit 089439ed90
145 changed files with 8087 additions and 3412 deletions

View file

@ -0,0 +1,25 @@
import { describe, expect, it } from "vitest";
import { isPublicPath } from "./publicPaths";
describe("isPublicPath", () => {
it.each([
"/login",
"/api/auth/login",
"/api/health",
"/shared/class/quizzes/token",
"/_next/static/chunk.js",
"/favicon.ico",
])("allows intentional public path %s", (pathname) => {
expect(isPublicPath(pathname)).toBe(true);
});
it.each([
"/private/file.txt",
"/api/decks/file.json",
"/api/authentication/fake",
"/shared-secret",
"/private/%2e%2e/data",
])("does not bypass authentication for %s", (pathname) => {
expect(isPublicPath(pathname)).toBe(false);
});
});