feat: introduce backend url environment variable
ref: N25B-352
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user