Skip to content

Commit

Permalink
[Discover] Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta committed Jun 27, 2024
1 parent 92c0e18 commit e1185d5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,20 @@ describe('context predecessors', function () {

// eslint-disable-next-line @typescript-eslint/no-explicit-any
let mockSearchSource: any;
const dataView = {
id: 'DATA_VIEW_ID',
timeFieldName: '@timestamp',
isTimeNanosBased: () => false,
popularizeField: () => {},
fields: {
getByName: jest.fn(),
},
} as unknown as DataView;
let dataView: DataView;

describe('function fetchPredecessors', function () {
beforeEach(() => {
dataView = {
id: 'DATA_VIEW_ID',
timeFieldName: '@timestamp',
isTimeNanosBased: () => false,
popularizeField: () => {},
fields: {
getByName: jest.fn(),
},
} as unknown as DataView;

mockSearchSource = createContextSearchSourceStub('@timestamp');
dataPluginMock = {
search: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,20 @@ describe('context successors', function () {
let dataPluginMock: DataPublicPluginStart;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let mockSearchSource: any;
const dataView = {
id: 'DATA_VIEW_ID',
timeFieldName: '@timestamp',
isTimeNanosBased: () => false,
popularizeField: () => {},
fields: {
getByName: jest.fn(),
},
} as unknown as DataView;
let dataView: DataView;

describe('function fetchSuccessors', function () {
beforeEach(() => {
dataView = {
id: 'DATA_VIEW_ID',
timeFieldName: '@timestamp',
isTimeNanosBased: () => false,
popularizeField: () => {},
fields: {
getByName: jest.fn(),
},
} as unknown as DataView;

mockSearchSource = createContextSearchSourceStub('@timestamp');

dataPluginMock = {
Expand Down

0 comments on commit e1185d5

Please sign in to comment.