Fix lint warning and update test assertions for ISO date format
CI / ci (push) Failing after 37s
Deploy / build-and-deploy (push) Failing after 6s

This commit is contained in:
2026-04-15 22:41:08 +03:00
parent 71d0c983fd
commit 47628c9a15
3 changed files with 8 additions and 9 deletions
+2 -2
View File
@@ -58,8 +58,8 @@ describe("getEnv", () => {
const { getEnv, __resetEnvCacheForTests } = await import("./index.js");
__resetEnvCacheForTests();
const env = getEnv();
// API_BASE_URL defaults to http://localhost:8080/api when not set
expect(env.API_BASE_URL).toBe("http://localhost:8080/api");
// API_BASE_URL defaults to Angular proxy in dev when not set
expect(env.API_BASE_URL).toBe("http://localhost:4200/api");
});
it("throws when NODE_ENV is not one of the allowed values", async () => {
@@ -55,7 +55,6 @@ export function useOnlineBoard(
}
})
.catch((err: unknown) => {
// eslint-disable-next-line no-console
console.error("[useOnlineBoard] API error:", err);
if (!cancelled) {
setError(err as ApiError);
@@ -211,8 +211,8 @@ describe("Flight search page integration", () => {
const callArgs = mockUseOnlineBoard.mock.calls[0]?.[0] as Record<string, string>;
expect(callArgs).toEqual({
dateFrom: "20250115",
dateTo: "20250115",
dateFrom: "2025-01-15T00:00:00",
dateTo: "2025-01-15T00:00:00",
departure: "SVO",
});
});
@@ -232,8 +232,8 @@ describe("Flight search page integration", () => {
const callArgs = mockUseOnlineBoard.mock.calls[0]?.[0] as Record<string, string>;
expect(callArgs).toEqual({
dateFrom: "20250115",
dateTo: "20250115",
dateFrom: "2025-01-15T00:00:00",
dateTo: "2025-01-15T00:00:00",
flightNumber: "SU100",
});
});
@@ -253,8 +253,8 @@ describe("Flight search page integration", () => {
const callArgs = mockUseOnlineBoard.mock.calls[0]?.[0] as Record<string, string>;
expect(callArgs).toEqual({
dateFrom: "20250115",
dateTo: "20250115",
dateFrom: "2025-01-15T00:00:00",
dateTo: "2025-01-15T00:00:00",
departure: "SVO",
arrival: "JFK",
});