nut.js provides custom matchers for Jest, which allows you to write UI tests using well known syntax.
In order to use our custom matchers we need to extend Jest's
toBeAt is a matcher which verifies mouse cursor position.
It also supports negation as known from other matchers:
toBeAt, it supports negation:
Sometimes we want to verify that our screen displays a certain image.
toShow receives a filename of an image in our resourceDirectory and checks whether it's visible on our screen or not.
Once again, it is also possible to negate an expectation: