feat: add logto auth and backend metrics integration
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
import { readAuthConfig } from "../src/shared/auth-config";
|
||||
|
||||
describe("auth-config", () => {
|
||||
test("returns the configured Logto settings", () => {
|
||||
expect(readAuthConfig()).toEqual({
|
||||
apiResource: "https://talent-search.intelligrow.cn",
|
||||
appId: "i4jkllbvih0554r4n0fd3",
|
||||
enableDevAuthPanel: true,
|
||||
logtoEndpoint: "https://login-api.intelligrow.cn",
|
||||
scopes: [
|
||||
"openid",
|
||||
"profile",
|
||||
"offline_access",
|
||||
"talent-search:read"
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
test("rejects empty endpoint values", () => {
|
||||
expect(() =>
|
||||
readAuthConfig({
|
||||
logtoEndpoint: ""
|
||||
})
|
||||
).toThrow(/logtoEndpoint/i);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user