Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-buttner committed Aug 10, 2020
1 parent 2f1836c commit afd29e6
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
* you may not use this file except in compliance with the Elastic License.
*/
import { ChildrenQuery } from './children';
import { PaginationBuilder } from '../utils/pagination';
import { ChildrenPaginationBuilder } from '../utils/children_pagination';
import { legacyEventIndexPattern } from './legacy_event_index_pattern';

describe('Children query', () => {
it('constructs a legacy multi search query', () => {
const query = new ChildrenQuery(new PaginationBuilder(1), 'index-pattern', 'endpointID');
const query = new ChildrenQuery(
new ChildrenPaginationBuilder(1),
'index-pattern',
'endpointID'
);
// using any here because otherwise ts complains that it doesn't know what bool and filter are
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const msearch: any = query.buildMSearch('1234');
Expand All @@ -20,7 +24,7 @@ describe('Children query', () => {
});

it('constructs a non-legacy multi search query', () => {
const query = new ChildrenQuery(new PaginationBuilder(1), 'index-pattern');
const query = new ChildrenQuery(new ChildrenPaginationBuilder(1), 'index-pattern');
// using any here because otherwise ts complains that it doesn't know what bool and filter are
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const msearch: any = query.buildMSearch(['1234', '5678']);
Expand Down

0 comments on commit afd29e6

Please sign in to comment.