Currently there is no documentation around using custom matchers with test utils. While custom matchers are specific to test libraries like Jasmine and Jest, adding documentation to clarify using custom matchers with vue-test-utils could be helpful.
This is a proposed documentation update.
Took a stab at this. If it's useful I will PR it.
IMHO,
I think Custom Matchers is a feature of the test runners and used in common test.
Since I think this is the business of the document of test runner,
I think it is inappropriate to add this document.
Nice write-up, although I agree with @38elements that this isn't specific to Vue Test Utils.
We could add a section on custom matchers to the testing-SFCs-with-jest guide, but rather than including an example we should include a few sentences and link to the Jest docs.
We don't currently have a section on using with Jasmine.
Maybe it's worth creating a library, vue-test-utils-jest-matchers (unofficially, I imagine) and linking to it along with a sentence or two as suggested. Or perhaps a blog post, in longer form, that the docs could link to as an example?
Since it is the business of the document of test runner,
I think adding link for document about a feature of test runner is inappropriate.
If it is necessary, I think adding it to Jest document is appropriate.
Good point, I think I can turn this into a blog post instead. I like the idea of adding a sentence on custom matchers and linking to the jest docs
If you'd like someone to proof your blog post before you post it, feel free to email me and I'd be happy to help :)
@shortdiv @eddyerburgh
IMHO, It seems that this issue may be closed.
Most helpful comment
Good point, I think I can turn this into a blog post instead. I like the idea of adding a sentence on custom matchers and linking to the jest docs