exposed bknd middlewares to be used for custom routes

This commit is contained in:
dswbx
2025-01-11 15:45:32 +01:00
parent bd4bc14282
commit d8671355a6
11 changed files with 20 additions and 32 deletions

View File

@@ -1,9 +1 @@
import { describe, expect, it } from "bun:test";
import { shouldSkipAuth } from "../../src/auth/middlewares";
describe("auth middleware", () => {
it("should skip auth on asset paths", () => {
expect(shouldSkipAuth(new Request("http://localhost/assets/test.js"))).toBe(true);
expect(shouldSkipAuth(new Request("http://localhost/"))).toBe(false);
});
});