diff --git a/public/app/plugins/datasource/elasticsearch/components/QueryEditor/ElasticsearchQueryContext.test.tsx b/public/app/plugins/datasource/elasticsearch/components/QueryEditor/ElasticsearchQueryContext.test.tsx index 45a78023954..e9a86acf80e 100644 --- a/public/app/plugins/datasource/elasticsearch/components/QueryEditor/ElasticsearchQueryContext.test.tsx +++ b/public/app/plugins/datasource/elasticsearch/components/QueryEditor/ElasticsearchQueryContext.test.tsx @@ -46,11 +46,9 @@ describe('ElasticsearchQueryContext', () => { // the following applies to all hooks in ElasticsearchQueryContext as they all share the same code. describe('useQuery Hook', () => { it('Should throw when used outside of ElasticsearchQueryContext', () => { - jest.spyOn(console, 'error').mockImplementation(() => {}); expect(() => { renderHook(() => useQuery()); }).toThrow(); - expect(console.error).toHaveBeenCalled(); }); it('Should return the current query object', () => {