This commit is contained in:
1 parent
8efd032cc6
commit
df38dccbf1
735 files changed
+128321
-120870
No files matched your search
@@ -2,10 +2,14 @@ import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("authorization source contract", () => {
|
||||
it("contains no fixed numeric rank threshold in central authorization files", () => {
|
||||
for (const file of ["src/lib/permissions.ts", "src/lib/proxy-access.ts", "src/lib/admin/guard.ts"]) {
|
||||
const source = readFileSync(file, "utf8");
|
||||
expect(source, file).not.toMatch(/rank\s*[<>]=?\s*\d+/i);
|
||||
}
|
||||
});
|
||||
it("contains no fixed numeric rank threshold in central authorization files", () => {
|
||||
for (const file of [
|
||||
"src/lib/permissions.ts",
|
||||
"src/lib/proxy-access.ts",
|
||||
"src/lib/admin/guard.ts",
|
||||
]) {
|
||||
const source = readFileSync(file, "utf8");
|
||||
expect(source, file).not.toMatch(/rank\s*[<>]=?\s*\d+/i);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user