Fix tests errors and warnings - iteration 2 (#12212) (#12214)

This commit is contained in:
Michael S. Molina
2021-01-25 17:03:16 -03:00
committed by GitHub
parent 8c29ba88a4
commit 3fb183349f
12 changed files with 87 additions and 57 deletions

View File

@@ -20,14 +20,18 @@ import React from 'react';
import Button from 'src/components/Button';
import { shallow } from 'enzyme';
import sinon from 'sinon';
import fetchMock from 'fetch-mock';
import Select from 'src/components/Select';
import QuerySearch from 'src/SqlLab/components/QuerySearch';
const SEARCH_ENDPOINT = 'glob:*/superset/search_queries?*';
fetchMock.get(SEARCH_ENDPOINT, []);
describe('QuerySearch', () => {
const search = sinon.spy(QuerySearch.prototype, 'refreshQueries');
const mockedProps = {
actions: {},
actions: { addDangerToast: jest.fn() },
height: 0,
displayLimit: 50,
};