Closed afenton90 closed 4 years ago
Happy to pick up the fix for this, if it isn't already being done
Hi! Thanks for bringing this up.
True that we should bump VTU to v1.0 now that it is out of beta, and handle these couple of deprecation messages.
If you're willing to work on this, then by all means! 🤗
for the record: There's an ongoing PR to port Vue Testing Library to Vue 3 and Vue Test Utils 2. This may be related.
However… may I ask why are you installing @vue/test-utils manually? I mean, Vue Testing Library already installs beta.32 for you.
Hey @afontcu thanks for the context. Yeah sure I can put in a PR to get that sorted 😄
For the @vue/test-utils
dependency I am not installing it manually. Seems that yarn
has resolved it to 1.0.0
even though the beta version is specified in package.json
.
This is the entry in my yarn.lock
file.
"@vue/test-utils@^1.0.0-beta.29", "@vue/test-utils@^1.0.0-beta.32":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.0.0.tgz#02e81ec674a45c694e95be2e06116a7275819c7b"
dependencies:
dom-event-types "^1.0.0"
lodash "^4.17.15"
pretty "^2.0.0"
oh, dang, you're right:
So, I think we should:
^1.0.0
as the desired version of VTU.attachToDocument
with attachTo
. no need to change anything else.isVueInstance
. Not sure about possible edge cases here. In VTU we replaced it with this.vm
, but that's not possible on Vue Testing Lib.:tada: This issue has been resolved in version 5.0.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Describe the bug
When running the latest versions of
@testing-library/vue
&@vue/test-utils
I get the following 2console.error
from@vue/test-utils
:[vue-test-utils]: options.attachToDocument is deprecated in favor of options.attachTo and will be removed in a future release
[vue-test-utils]: isVueInstance is deprecated and will removed in the next major version
It is true that these will be deprecated in the next major version of
@vue/test-utils
and there are alternatives available in the latest releases.To Reproduce Steps to reproduce the behavior:
Install the latest versions of
@testing-library/vue
&@vue/test-utils
and run tests.Expected behavior
The warnings above do not appear as the library has been refactored.
Related information:
@testing-library/vue
version: 5.0.2Vue
version: 2.6.11@vue/test-utils
version: 1.0.0node
version: v12.6.0npm
(oryarn
) version: 1.22.4Additional context
Looks like
@vue/test-utils
has recently had it's 1.0.0 release with these added