test: preserve auth worker boundary

This commit is contained in:
2026-07-02 04:12:15 -07:00
parent efc2110f44
commit 28c77df4e3

View File

@@ -36,6 +36,11 @@ describe("cfw-auth worker", () => {
expect(response.status).toBe(404); expect(response.status).toBe(404);
}); });
it("does not expose a custom Autumn sync endpoint", async () => {
const response = await worker.fetch(new Request("http://auth.local/internal/autumn/sync"), env);
expect(response.status).toBe(404);
});
it("exposes Better Auth OpenAPI reference", async () => { it("exposes Better Auth OpenAPI reference", async () => {
const response = await worker.fetch(new Request("http://auth.local/api/auth/reference"), env); const response = await worker.fetch(new Request("http://auth.local/api/auth/reference"), env);
expect(response.status).toBe(200); expect(response.status).toBe(200);