feat: compose executable frontend runtime
This commit is contained in:
@@ -35,6 +35,20 @@ describe("runtime configuration boundary", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("allows demo authentication only for local runtime configuration", () => {
|
||||
expect(
|
||||
validateRuntimeConfig({ ...validConfig, AUTH_MODE: "demo" }).success,
|
||||
).toBe(true);
|
||||
expect(
|
||||
validateRuntimeConfig({
|
||||
...validConfig,
|
||||
APP_ENV: "production",
|
||||
API_BASE_URL: "https://api.example.test",
|
||||
AUTH_MODE: "demo",
|
||||
}).success,
|
||||
).toBe(false);
|
||||
});
|
||||
|
||||
it("validates a fetched config under the 500ms budget excluding network", async () => {
|
||||
let current = 100;
|
||||
const result = await loadRuntimeConfig({
|
||||
|
||||
Reference in New Issue
Block a user