diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.tsx b/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.tsx index 63f67170d05ff..6a25492ce5a8d 100644 --- a/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.tsx +++ b/superset-frontend/src/SqlLab/components/SqlEditor/SqlEditor.test.tsx @@ -145,8 +145,8 @@ describe('SqlEditor', () => { (SqlEditorLeftBar as jest.Mock).mockImplementation(() => (
)); - (ResultSet as jest.Mock).mockClear(); - (ResultSet as jest.Mock).mockImplementation(() => ( + (ResultSet as unknown as jest.Mock).mockClear(); + (ResultSet as unknown as jest.Mock).mockImplementation(() => ( )); }); @@ -182,7 +182,8 @@ describe('SqlEditor', () => { const editor = await findByTestId('react-ace'); const sql = 'select *'; const renderCount = (SqlEditorLeftBar as jest.Mock).mock.calls.length; - const renderCountForSouthPane = (ResultSet as jest.Mock).mock.calls.length; + const renderCountForSouthPane = (ResultSet as unknown as jest.Mock).mock + .calls.length; expect(SqlEditorLeftBar).toHaveBeenCalledTimes(renderCount); expect(ResultSet).toHaveBeenCalledTimes(renderCountForSouthPane); fireEvent.change(editor, { target: { value: sql } });