Skip to content

Missing decpration warning for wrapper.contains() from documentaion #1582

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
SmilingJoe opened this issue Jun 15, 2020 · 6 comments · Fixed by #1612
Closed

Missing decpration warning for wrapper.contains() from documentaion #1582

SmilingJoe opened this issue Jun 15, 2020 · 6 comments · Fixed by #1612
Labels

Comments

@SmilingJoe
Copy link
Contributor

What problem does this feature solve?

Recently upgraded @vue/test-utils from 1.0.0-beta.31 to 1.0.2. Upon running our unit tests, received the following error:
ERROR: '[vue-test-utils]: contains is deprecated and will be removed in the next major version Use wrapper.find, wrapper.findComponent or wrapper.get instead'

Noticed that there is no warning of this deprecation specified in the API Wrapper documentation:
https://vue-test-utils.vuejs.org/api/wrapper/#contains

Providing this deprecation warning, along with a specific replacement example, in the documentation will save time for developers.

What does the proposed API look like?

Propose adding the following deprecation warning to the top of relevant API Wrapper "contains" document:

| Deprecation warning
| `contains` is deprecated and will be removed in future releases. Use 'wrapper.find', `wrapper.findComponent` or `wrapper.get` instead.
@SmilingJoe
Copy link
Contributor Author

SmilingJoe commented Jun 16, 2020

Just noticed that there is a deprecation warning on the 'wrapper.find' document (https://vue-test-utils.vuejs.org/api/wrapper/#find), which would obviously preclude that method from being part of this deprecation warning.

@afontcu
Copy link
Member

afontcu commented Jun 16, 2020

Hi! You're right, we're missing a deprecation warning on docs. Fancy to open up a PR? :)

@SmilingJoe
Copy link
Contributor Author

Sure, I can do that.

@afontcu afontcu added the docs label Jun 17, 2020
@afontcu
Copy link
Member

afontcu commented Jul 9, 2020

Hi @SmilingJoe! Did you have the chance to take a look at this? :)

@SmilingJoe
Copy link
Contributor Author

SmilingJoe commented Jul 11, 2020

Sorry @afontcu I've been tied up with other projects. Looking into this now as I have some free time.

Raised PR: #1612

@SmilingJoe SmilingJoe mentioned this issue Jul 12, 2020
13 tasks
@afontcu
Copy link
Member

afontcu commented Jul 12, 2020

Fixed in #1612!

@afontcu afontcu closed this as completed Jul 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants