diff --git a/web/ui/react-app/src/ExpressionInput.test.tsx b/web/ui/react-app/src/ExpressionInput.test.tsx index d9e739d2ea..07bb0b01ef 100644 --- a/web/ui/react-app/src/ExpressionInput.test.tsx +++ b/web/ui/react-app/src/ExpressionInput.test.tsx @@ -177,8 +177,7 @@ describe('ExpressionInput', () => { it('should blur input on escape', () => { const downshift = expressionInput.find(Downshift); const instance: any = expressionInput.instance(); - const spyBlur = jest.fn(); - instance.exprInputRef.current.blur = spyBlur; + const spyBlur = jest.spyOn(instance.exprInputRef.current, 'blur'); const input = downshift.find(Input); downshift.setState({ isOpen: false }); const event = getKeyEvent('Escape');