Skip to content

Commit

Permalink
Fix ActorUpdateCoordinator test
Browse files Browse the repository at this point in the history
  • Loading branch information
1000nettles committed Oct 28, 2021
1 parent 5c89a6b commit 52f7ddd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/module/ActorUpdateCoordinator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ let mockRenderer;
let mockSocketController;
let mockCalculator;
let mockState;
let mockMasking;
let coordinator;

beforeEach(() => {
mockRenderer = {};
mockSocketController = {};
mockCalculator = {};
mockState = {};
mockMasking = {};
coordinator = new ActorUpdateCoordinator(
mockRenderer,
mockSocketController,
mockCalculator,
mockState,
mockMasking,
);
});

Expand Down Expand Up @@ -55,7 +58,7 @@ it('should process and render and emit to the socket controller if we are using
mockCalculator.getHpDiff = () => 5;
mockCalculator.getCoordinates = () => ({ x: 1, y: 2 });

mockState.getIsMask = () => true;
mockMasking.shouldMaskToken = () => true;
mockRenderer.processMaskedAndRender = jest.fn();
mockSocketController.emit = jest.fn();

Expand Down Expand Up @@ -83,7 +86,7 @@ it('should process and render and emit to the socket controller if we are using
mockCalculator.getHpDiff = () => 5;
mockCalculator.getCoordinates = () => ({ x: 1, y: 2 });

mockState.getIsMask = () => false;
mockMasking.shouldMaskToken = () => false;
mockRenderer.processNumericAndRender = jest.fn();
mockSocketController.emit = jest.fn();

Expand Down

0 comments on commit 52f7ddd

Please sign in to comment.