Jest Expected mock function to have been called, but it was not called
I've looked at various suggestions to solve testing a class property with no success and was wondering if anyone could possibly cast a little more light on where I may be going wrong, here are the tests I've tried all with the error Expected mock function to have been called, but it was not called. Search.jsx import React, { Component } from 'react' import { func } from 'prop-types' import Input from './Input' import Button from './Button' class SearchForm extends Component { static propTypes = { toggleAlert: func.isRequired } constructor() { super() this.state = { searchTerm: '' } this