Skip to content

Commit 93a622a

Browse files
committed
Fix tests.
1 parent 7f41c41 commit 93a622a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/hooks/useFields.test.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,39 +48,39 @@ describe('useFields hook', () => {
4848
{ wrapper, initialProps: 'cardinality' }
4949
);
5050
result.current();
51-
expect(getFields).toHaveBeenLastCalledWith([], timeRange);
51+
expect(getFields).toHaveBeenLastCalledWith(true, [], timeRange);
5252

5353
// All other metric aggregations only work on numbers
5454
rerender('avg');
5555
result.current();
56-
expect(getFields).toHaveBeenLastCalledWith(['number'], timeRange);
56+
expect(getFields).toHaveBeenLastCalledWith(true, ['number'], timeRange);
5757

5858
//
5959
// BUCKET AGGREGATIONS
6060
//
6161
// Date Histrogram only works on dates
6262
rerender('date_histogram');
6363
result.current();
64-
expect(getFields).toHaveBeenLastCalledWith(['date'], timeRange);
64+
expect(getFields).toHaveBeenLastCalledWith(true, ['date'], timeRange);
6565

6666
// Histrogram only works on numbers
6767
rerender('histogram');
6868
result.current();
69-
expect(getFields).toHaveBeenLastCalledWith(['number'], timeRange);
69+
expect(getFields).toHaveBeenLastCalledWith(true, ['number'], timeRange);
7070

7171
// Geohash Grid only works on geo_point data
7272
rerender('geohash_grid');
7373
result.current();
74-
expect(getFields).toHaveBeenLastCalledWith(['geo_point'], timeRange);
74+
expect(getFields).toHaveBeenLastCalledWith(true, ['geo_point'], timeRange);
7575

7676
// All other bucket aggregation work on any kind of data
7777
rerender('terms');
7878
result.current();
79-
expect(getFields).toHaveBeenLastCalledWith([], timeRange);
79+
expect(getFields).toHaveBeenLastCalledWith(true, [], timeRange);
8080

8181
// top_metrics work on only on numeric data in 7.7
8282
rerender('top_metrics');
8383
result.current();
84-
expect(getFields).toHaveBeenLastCalledWith(['number'], timeRange);
84+
expect(getFields).toHaveBeenLastCalledWith(true, ['number'], timeRange);
8585
});
8686
});

0 commit comments

Comments
 (0)