This commit is contained in:
1 parent
8efd032cc6
commit
df38dccbf1
735 files changed
+128321
-120870
No files matched your search
@@ -2,12 +2,14 @@ import { readFileSync } from "node:fs";
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
describe("proxy authentication boundary", () => {
|
||||
it("uses a database-free Auth.js decoder", () => {
|
||||
const proxy = readFileSync("src/proxy.ts", "utf8");
|
||||
const proxyAuth = readFileSync("src/lib/proxy-auth.ts", "utf8");
|
||||
it("uses a database-free Auth.js decoder", () => {
|
||||
const proxy = readFileSync("src/proxy.ts", "utf8");
|
||||
const proxyAuth = readFileSync("src/lib/proxy-auth.ts", "utf8");
|
||||
|
||||
expect(proxy).toContain('from "@/lib/proxy-auth"');
|
||||
expect(proxy).not.toContain('from "@/lib/auth"');
|
||||
expect(proxyAuth).not.toMatch(/from\s+["'][^"']*(prisma|site-settings|credentials)[^"']*["']/i);
|
||||
});
|
||||
expect(proxy).toContain('from "@/lib/proxy-auth"');
|
||||
expect(proxy).not.toContain('from "@/lib/auth"');
|
||||
expect(proxyAuth).not.toMatch(
|
||||
/from\s+["'][^"']*(prisma|site-settings|credentials)[^"']*["']/i,
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user