Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkime committed Dec 20, 2022
1 parent 0dc8292 commit a4ee983
Showing 1 changed file with 1 addition and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Side Public License, v 1.
*/

import { loadDataView, getFallbackDataViewId } from './resolve_data_view';
import { loadDataView } from './resolve_data_view';
import { dataViewsMock } from '../../../__mocks__/data_views';
import { dataViewMock } from '../../../__mocks__/data_view';
import { configMock } from '../../../__mocks__/config';
Expand All @@ -26,13 +26,4 @@ describe('Resolve data view tests', () => {
expect(result.stateValFound).toBe(false);
expect(result.stateVal).toBe(dataViewId);
});
test('getFallbackDataViewId with an empty dataViews array', async () => {
const result = await getFallbackDataViewId([], '');
expect(result).toBe('');
});
test('getFallbackDataViewId with an dataViews array', async () => {
const list = await dataViewsMock.getIdsWithTitle();
const result = await getFallbackDataViewId(list, '');
expect(result).toBe('the-data-view-id');
});
});

0 comments on commit a4ee983

Please sign in to comment.