fix(deploy): close container final review

This commit is contained in:
2026-07-12 00:44:39 +02:00
parent 0ca6346f75
commit a3a266fd81
30 changed files with 526 additions and 37 deletions
+14
View File
@@ -14,6 +14,20 @@ describe("resolveBackendUrl", () => {
it("preserves the client default when Vite has no configured backend", () => {
expect(backendBaseUrl).toBe(import.meta.env.VITE_BACKEND_URL ?? "http://localhost:8787");
});
it.each(["/backend", "api", "//evil.test", "ftp://example.test", "https://user:pass@example.test"])(
"rejects unsupported backend URL %j",
(backendBaseUrl) => {
expect(() => resolveBackendUrl({ backendBaseUrl })).toThrow(/BACKEND_BASE_URL/);
},
);
it.each(["", "/", "/api", "/api/", "http://localhost:8787", "https://api.example.test/v1"])(
"accepts supported backend URL %j",
(backendBaseUrl) => {
expect(resolveBackendUrl({ backendBaseUrl })).toBe(backendBaseUrl);
},
);
});
describe("joinBackendPath", () => {