test(frontend): use absolute path for src imports (#9761)

* test(frontend): use absolute path for src imports

* Upgrade prettier, fix eslint
This commit is contained in:
Jesse Yang
2020-05-07 14:18:10 -07:00
committed by GitHub
parent 6237cea952
commit 13c5b133a9
220 changed files with 827 additions and 1730 deletions

View File

@@ -21,9 +21,9 @@ import { shallow } from 'enzyme';
import sinon from 'sinon';
import { Alert, ProgressBar } from 'react-bootstrap';
import FilterableTable from '../../../src/components/FilterableTable/FilterableTable';
import ExploreResultsButton from '../../../src/SqlLab/components/ExploreResultsButton';
import ResultSet from '../../../src/SqlLab/components/ResultSet';
import FilterableTable from 'src/components/FilterableTable/FilterableTable';
import ExploreResultsButton from 'src/SqlLab/components/ExploreResultsButton';
import ResultSet from 'src/SqlLab/components/ResultSet';
import { queries, stoppedQuery, runningQuery, cachedQuery } from './fixtures';
describe('ResultSet', () => {
@@ -97,12 +97,9 @@ describe('ResultSet', () => {
wrapper.setProps({ query: emptyResults });
expect(wrapper.find(FilterableTable)).toHaveLength(0);
expect(wrapper.find(Alert)).toHaveLength(1);
expect(
wrapper
.find(Alert)
.shallow()
.text(),
).toBe('The query returned no data');
expect(wrapper.find(Alert).shallow().text()).toBe(
'The query returned no data',
);
});
it('should render cached query', () => {
const wrapper = shallow(<ResultSet {...cachedQueryProps} />);