Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
byronhulcher committed Sep 23, 2021
1 parent e8bc951 commit 18cae24
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ describe('EngineLogic', () => {
expect(EngineLogic.actions.onPollStart).toHaveBeenCalled();
});

it('polls for engine data if the current engine is empty', () => {
mount({ engine: {} });
it('polls for engine data if the current engine has no documents', () => {
mount({ engine: { ...mockEngineData, document_count: 0 } });
jest.spyOn(EngineLogic.actions, 'initializeEngine');

EngineLogic.actions.pollEmptyEngine();
Expand All @@ -267,8 +267,8 @@ describe('EngineLogic', () => {
expect(EngineLogic.actions.initializeEngine).toHaveBeenCalledTimes(2);
});

it('cancels the poll if the current engine changed from empty to non-empty', () => {
mount({ engine: mockEngineData });
it('cancels the poll if the current engine has documents', () => {
mount({ engine: { ...mockEngineData, document_count: 1 } });
jest.spyOn(EngineLogic.actions, 'stopPolling');
jest.spyOn(EngineLogic.actions, 'initializeEngine');

Expand Down

0 comments on commit 18cae24

Please sign in to comment.