fix ElasticsearchQueryContext test
This commit is contained in:
-2
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user