Skip to content

Is relying on @testing-library's get* methods to throw and fail a test an anti-pattern? #2198

Closed Answered by sarayourfriend
sarayourfriend asked this question in Q&A
Discussion options

You must be logged in to vote

Olga and Zack have agreed that this isn't a good approach. I've created six issues to update the modules that use non-explicit assertions based on get*. They are contained in this milestone: https://github.com/WordPress/openverse/milestone/13

Each are medium priority based on the potential for misuse/misunderstanding. The milestone includes a note for why v-tabs is excluded despite the fact that it extends the assertion function names (it does so appropriately). The v-popover.spec.js issue includes a caveat along the same lines.

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@zackkrida
Comment options

@sarayourfriend
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by sarayourfriend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants