diff --git a/src/GridEngine.test.ts b/src/GridEngine.test.ts index 54e316fd..e8e97487 100644 --- a/src/GridEngine.test.ts +++ b/src/GridEngine.test.ts @@ -937,6 +937,7 @@ describe("GridEngine", () => { }); it("should follow a char", () => { + const isPosAllowedFn = () => false; gridEngine.create(createDefaultMockWithLayer(undefined), { characters: [ { @@ -954,6 +955,9 @@ describe("GridEngine", () => { closestPointIfBlocked: true, maxPathLength: 10000, ignoreLayers: true, + isPositionAllowedFn: isPosAllowedFn, + ignoredChars: ["test"], + considerCosts: true, }); expect(gridEngine.getMovement("player")).toEqual({ @@ -966,6 +970,9 @@ describe("GridEngine", () => { maxPathLength: 10000, ignoreLayers: true, shortestPathAlgorithm: "BIDIRECTIONAL_SEARCH", + ignoredChars: ["test"], + isPositionAllowedFn: isPosAllowedFn, + considerCosts: true, }, }); }); @@ -996,6 +1003,9 @@ describe("GridEngine", () => { maxPathLength: Infinity, ignoreLayers: false, shortestPathAlgorithm: "BIDIRECTIONAL_SEARCH", + ignoredChars: [], + isPositionAllowedFn: expect.anything(), + considerCosts: false, }, }); }); diff --git a/src/GridEngineHeadless.test.ts b/src/GridEngineHeadless.test.ts index 15c4d1eb..d95ca514 100644 --- a/src/GridEngineHeadless.test.ts +++ b/src/GridEngineHeadless.test.ts @@ -828,7 +828,7 @@ describe("GridEngineHeadless", () => { expect(gridEngineHeadless.getMovement("player")).toEqual({ type: "Follow", - config: expect.objectContaining({ + config: { charToFollow: "player2", distance: 0, noPathFoundStrategy: NoPathFoundStrategy.STOP, @@ -839,7 +839,7 @@ describe("GridEngineHeadless", () => { ignoredChars: [], isPositionAllowedFn: expect.anything(), considerCosts: false, - }), + }, }); });