Skip to content

Commit

Permalink
add missing fetchMock
Browse files Browse the repository at this point in the history
  • Loading branch information
justinpark committed Jul 13, 2023
1 parent 919ab80 commit 460190f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jest.mock('src/components/AsyncAceEditor', () => ({
}));
jest.mock('src/SqlLab/components/SqlEditorLeftBar', () => jest.fn());

fetchMock.get('glob:*/api/v1/database/*/function_names/', {
function_names: [],
});
fetchMock.get('glob:*/api/v1/database/*', { result: [] });
fetchMock.get('glob:*/api/v1/database/*/tables/*', { options: [] });
fetchMock.post('glob:*/sqllab/execute/*', { result: [] });
Expand Down Expand Up @@ -138,7 +141,7 @@ describe('SqlEditor', () => {
).toBeInTheDocument();
});

it('render a SqlEditorLeftBar', async () => {
it.only('render a SqlEditorLeftBar', async () => {

Check failure on line 144 in superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.jsx

View workflow job for this annotation

GitHub Actions / frontend-build

Unexpected focused test

Check failure on line 144 in superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.jsx

View workflow job for this annotation

GitHub Actions / frontend-build

it.only not permitted
const { getByTestId } = setup(mockedProps, store);
await waitFor(() =>
expect(getByTestId('mock-sql-editor-left-bar')).toBeInTheDocument(),
Expand Down

0 comments on commit 460190f

Please sign in to comment.