feat: introduce backend url environment variable

ref: N25B-352
This commit is contained in:
Twirre Meulenbelt
2026-01-29 17:40:49 +01:00
parent 378a64c7ca
commit 4395e44dbf
15 changed files with 65 additions and 23 deletions

View File

@@ -6,6 +6,7 @@ import "@testing-library/jest-dom";
import {type LogRecord, useLogs} from "../../../src/components/Logging/useLogs.ts";
import {type cell, useCell} from "../../../src/utils/cellStore.ts";
import { StrictMode } from "react";
import { API_BASE_URL } from "../../../src/config/api.ts";
jest.mock("../../../src/utils/priorityFiltering.ts", () => ({
applyPriorityPredicates: jest.fn((_log, preds: any[]) =>
@@ -83,7 +84,7 @@ describe("useLogs (unit)", () => {
);
const es = (globalThis as any).__es as MockEventSource;
expect(es).toBeTruthy();
expect(es.url).toBe("http://localhost:8000/logs/stream");
expect(es.url).toBe(`${API_BASE_URL}/logs/stream`);
unmount();
expect(es.close).toHaveBeenCalledTimes(1);