Fix lint warning and update test assertions for ISO date format
This commit is contained in:
Vendored
+2
-2
@@ -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",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user