fix ElasticsearchQueryContext test

This commit is contained in:
Ashley Harrison
2025-12-08 16:58:08 +00:00
parent f7d8fd4986
commit afe54f6739
@@ -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', () => {