A downstream fork of Tranquil PDS for use in margin.cafe margin.cafe
Something went wrong. Try again.
1234567891011121314import { describe, expect, it } from "vitest";import { classifyAppPasswordScopes } from "../lib/appPasswordScopes.ts";
describe("classifyAppPasswordScopes", () => { it.each([ ["atproto transition:generic transition:chat.bsky", "full"], ["atproto transition:generic", "full"], ["atproto account:*?action=read", "readonly"], ["atproto blob:*/* repo:*?action=create", "post"], ["atproto repo:custom.example.record", "custom"], ] as const)("classifies %s as %s", (scopes, expected) => { expect(classifyAppPasswordScopes(scopes)).toBe(expected); });});