Second article

If you need more control over the negative comparison

Custom negative comparators

If you need more control over the negative comparison (the not case) than the simple boolean inversion above, you can also have your matcher factory include another key, negativeCompare alongside compare, for which the value is a function to invoke when .not is used. This function/key is optional.

Register the custom matchers with Jasmine. All properties on the object passed in will be available as custom matchers (e.g., in this case toBeGoofy).