MyMatcherbeing the name of your custom matcher function:
expectationobject and a second argument which is a structure of all the arguments with which the matcher function was called with. It must then return a true or a false depending if it passes your criteria. It will most likely use the
expectationobject to retrieve the actual and isNot values. It can also set a custom failure message on the expectation object itself by using the
messageproperty of the
beforeEach()life-cycle method blocks for performance considerations and global availability.