Skip to content

Commit

Permalink
fix jest test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed May 8, 2024
1 parent b399fca commit 9806de9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -702,12 +702,12 @@ describe('ruleType', () => {

(searchSourceInstanceMock.getField as jest.Mock).mockImplementationOnce((name: string) => {
if (name === 'index') {
return { dataViewMock, timeFieldName: undefined };
return { dataViewMock, getTimeField: () => undefined, id: 1234 };
}
});

await expect(invokeExecutor({ params, ruleServices })).rejects.toThrow(
'Invalid data view without timeFieldName.'
'Data view with ID 1234 no longer contains a time field.'
);
});

Expand Down

0 comments on commit 9806de9

Please sign in to comment.