-
Notifications
You must be signed in to change notification settings - Fork 668
Jasmine / Jest matchers #1254
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
Comments
@eddyerburgh Do you think custom matchers for common test frameworks (Jasmine and Jest?) could be a package inside vue-test-utils? This would ensure the matchers are always compatible with the latest version of the library. |
Maybe they could be included in the future, but for now we should focus on getting v1 released with the current API. |
@eddyerburgh Would it make sense to you if I develop them in a separate package already that we can then merge after v1 got released? EDIT: This will not happen as I have stopped using Vue in my projects. |
Yes that's a good idea |
there is https://github.com/hmsk/jest-matcher-vue-test-utils which is also in the docs now thanks to #1372 🙂 |
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
use
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
The text was updated successfully, but these errors were encountered: