Skip to content

Docs to explain using custom matchers with test utils #634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
shortdiv opened this issue May 20, 2018 · 8 comments
Closed

Docs to explain using custom matchers with test utils #634

shortdiv opened this issue May 20, 2018 · 8 comments
Labels

Comments

@shortdiv
Copy link
Contributor

What problem does this feature solve?

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.

What does the proposed API look like?

This is a proposed documentation update.

@shortdiv
Copy link
Contributor Author

Took a stab at this. If it's useful I will PR it.

@38elements
Copy link
Contributor

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.

@eddyerburgh
Copy link
Member

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.

@ascii-soup
Copy link

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?

@38elements
Copy link
Contributor

38elements commented May 21, 2018

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.

@shortdiv
Copy link
Contributor Author

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

@ascii-soup
Copy link

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 :)

@38elements
Copy link
Contributor

@shortdiv @eddyerburgh
IMHO, It seems that this issue may be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants