diff --git a/tests/core/game/RailNetwork.test.ts b/tests/core/game/RailNetwork.test.ts index 1ebe38235..b870f82ce 100644 --- a/tests/core/game/RailNetwork.test.ts +++ b/tests/core/game/RailNetwork.test.ts @@ -22,6 +22,7 @@ const createMockStation = (unitId: number): any => { addRailroad: jest.fn(), getRailroads: jest.fn(() => railroads), clearRailroads: jest.fn(), + onStationRemoved: jest.fn(), }; }; diff --git a/tests/core/game/TrainStation.test.ts b/tests/core/game/TrainStation.test.ts index f99847ee2..987614f4d 100644 --- a/tests/core/game/TrainStation.test.ts +++ b/tests/core/game/TrainStation.test.ts @@ -21,6 +21,8 @@ describe("TrainStation", () => { }), addUpdate: jest.fn(), addExecution: jest.fn(), + x: jest.fn((tile) => tile?.x ?? 0), + y: jest.fn((tile) => tile?.y ?? 0), } as any; player = { @@ -42,6 +44,7 @@ describe("TrainStation", () => { loadCargo: jest.fn(), owner: jest.fn().mockReturnValue(player), level: jest.fn(), + shareJourneyInfo: jest.fn().mockReturnValue({ routeInformation: [] }), } as any; }); @@ -71,6 +74,7 @@ describe("TrainStation", () => { it("checks trade availability (same owner)", () => { const otherUnit = { owner: jest.fn().mockReturnValue(unit.owner()), + tile: jest.fn().mockReturnValue({ x: 0, y: 0 }), } as any; const station = new TrainStation(game, unit);