Skip to content

Commit

Permalink
Fixed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuznietsov committed Oct 11, 2022
1 parent e7c8e89 commit f25bc57
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ describe('convertToLens', () => {
test('should return null if metrics count is more than 1', async () => {
mockGetColumnsFromVis.mockReturnValue({
metrics: ['1', '2'],
buckets: [],
columns: [{ columnId: '2' }, { columnId: '1' }],
});
const result = await convertToLens(vis, timefilter);
Expand All @@ -116,6 +117,7 @@ describe('convertToLens', () => {
test('should return null if metric column data type is different from number', async () => {
mockGetColumnsFromVis.mockReturnValue({
metrics: ['1'],
buckets: [],
columns: [{ columnId: '2' }, { columnId: '1', dataType: 'string' }],
});
const result = await convertToLens(vis, timefilter);
Expand All @@ -129,6 +131,7 @@ describe('convertToLens', () => {

mockGetColumnsFromVis.mockReturnValue({
metrics: ['1'],
buckets: [],
columns: [{ columnId: '1', dataType: 'number' }],
columnsWithoutReferenced: [
{ columnId: '1', meta: { aggId: 'agg-1' } },
Expand Down

0 comments on commit f25bc57

Please sign in to comment.