Closed
Description
What problem does this feature solve?
Custom matchers help to make tests more readable and can provide easier to understand error messages.
What does the proposed API look like?
Instead of
expect(wrapper.exists()).toBe(true)
use
expect(wrapper).toExist()
for example. After #1135 is resolved, this could provide the selector in the error message if the assertion fails.
Documenting the use of custom matchers was previously discussed in #634. However here I want to suggest providing matchers as part of vue-test-utils rather than documenting how to do it yourself.
See also