Optimized routing
Test and publish container images / test (push) Successful in 2m21s
Test and publish container images / publish (push) Failing after 4s

This commit is contained in:
BuTzZ
2026-07-27 10:18:31 +02:00
parent 55ce94066e
commit 9813a1fafb
16 changed files with 1602 additions and 364 deletions
+21
View File
@@ -0,0 +1,21 @@
import { describe, expect, it } from "vitest";
import { loadEnv } from "../src/env.js";
describe("API environment", () => {
it("keeps demo data and seed routes disabled unless explicitly enabled", () => {
expect(loadEnv({ NODE_ENV: "production" }).demoData).toBe(false);
expect(loadEnv({ NODE_ENV: "test" }).demoData).toBe(false);
expect(
loadEnv({ NODE_ENV: "production", WATERMAPS_DEMO_DATA: "false" }).demoData
).toBe(false);
});
it("accepts the current and legacy explicit demo switches", () => {
expect(
loadEnv({ NODE_ENV: "production", WATERMAPS_DEMO_DATA: "true" }).demoData
).toBe(true);
expect(
loadEnv({ NODE_ENV: "production", SEA_COMPASS_DEMO_DATA: "true" }).demoData
).toBe(true);
});
});