Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
978 B ยท 27 lines
TypeScript
at main
12345678910111213141516171819202122232425262728import { expect } from "@std/expect";import { describe, test } from "@std/testing/bdd";
import { SLACK_BOT_SCOPES, missingSlackScopes } from "../slack-scopes";
describe("missingSlackScopes", () => { test("nothing missing when every scope was granted", () => { expect(missingSlackScopes(SLACK_BOT_SCOPES.join(","))).toEqual([]); });
test("an install from before the incident scopes needs a reconnect", () => { const old = "app_mentions:read,assistant:write,channels:history,channels:join,chat:write,commands,groups:history,groups:read,groups:write,im:history,users:read,users:read.email"; expect(missingSlackScopes(old)).toEqual([ "channels:manage", "channels:read", "channels:write.invites", "pins:write", "reactions:read", "reactions:write", ]); });
test("no scopes recorded means everything is missing", () => { expect(missingSlackScopes(undefined)).toHaveLength(SLACK_BOT_SCOPES.length); });});