From 68e7b6b483fa42fac4426f033ce8a95326da2240 Mon Sep 17 00:00:00 2001 From: scamiv <6170744+scamiv@users.noreply.github.com> Date: Wed, 25 Feb 2026 14:27:25 +0100 Subject: [PATCH] fix TradeShipExecution tests --- tests/core/executions/TradeShipExecution.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/core/executions/TradeShipExecution.test.ts b/tests/core/executions/TradeShipExecution.test.ts index 3d3d5bb03..81cff0b02 100644 --- a/tests/core/executions/TradeShipExecution.test.ts +++ b/tests/core/executions/TradeShipExecution.test.ts @@ -74,9 +74,11 @@ describe("TradeShipExecution", () => { tradeShip = { isActive: vi.fn(() => true), owner: vi.fn(() => origOwner), + id: vi.fn(() => 123), move: vi.fn(), setTargetUnit: vi.fn(), setSafeFromPirates: vi.fn(), + touch: vi.fn(), delete: vi.fn(), tile: vi.fn(() => 2001), } as any; @@ -85,6 +87,7 @@ describe("TradeShipExecution", () => { tradeShipExecution.init(game, 0); tradeShipExecution["pathFinder"] = { next: vi.fn(() => ({ status: PathStatus.NEXT, node: 2001 })), + findPath: vi.fn((from: number) => [from]), } as any; tradeShipExecution["tradeShip"] = tradeShip; }); @@ -116,6 +119,7 @@ describe("TradeShipExecution", () => { it("should complete trade and award gold", () => { tradeShipExecution["pathFinder"] = { next: vi.fn(() => ({ status: PathStatus.COMPLETE, node: 2001 })), + findPath: vi.fn((from: number) => [from]), } as any; tradeShipExecution.tick(1); expect(tradeShip.delete).toHaveBeenCalledWith(false);