test(server): remove Azure permissions constant snapshot (#9973)

This commit is contained in:
Julius Marminge authored and GitHub committed 2026-09-05 00:05:07 -07:00
1 parent dfc70a3294
commit 32142cff18
2 files changed
+1 -30

No files matched your search

@@ -1,29 +0,0 @@
import { describe, expect, it } from "vite-plus/test";
import { AZURE_DEVOPS_VIEWER_PERMISSIONS } from "./AzureDevOpsPullRequestProvider.ts";
describe("azure devops viewer permissions", () => {
it("offers every action to whoever is signed in, because Azure names no permission", () => {
// The same answer for a viewer who can write, one who can only read, and an author with read
// access: `az repos pr show` and `az repos pr list` carry nothing about the caller's standing,
// and an unknown permission is granted rather than guessed away. Azure refuses the ones it
// will not allow, at the moment they are taken, in words this could not have written.
expect(AZURE_DEVOPS_VIEWER_PERMISSIONS).toEqual({
actions: [
"merge",
"ready",
"draft",
"close",
"reopen",
"enable-auto-merge",
"disable-auto-merge",
],
// False because the host itself cannot post one, not because this viewer may not.
comment: false,
resolve: false,
verdicts: [],
// True because `az repos pr reviewer` does take one, and Azure says nothing about who may.
requestReviewers: true,
});
});
});
@@ -56,7 +56,7 @@ const CAPABILITIES: PullRequestCapabilities = {
* they try. That is the safer half of an unknown: hiding a control from someone entitled to it
* leaves them no way through and no reason given.
*/
export const AZURE_DEVOPS_VIEWER_PERMISSIONS: PullRequestViewerPermissions = {
const AZURE_DEVOPS_VIEWER_PERMISSIONS: PullRequestViewerPermissions = {
actions: CAPABILITIES.actions,
comment: CAPABILITIES.comment,
resolve: CAPABILITIES.review.resolve,