-
Notifications
You must be signed in to change notification settings - Fork 672
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
Jest 22.x support #369
Comments
Can someone create a reproduction in a GitHub repo? |
I ran into a similar issue with SVG and based on my searching, it is a JSDOM / javascript issue with SVGs, not necessarily vue-test-utils or jest. I haven't looked into this since the early betas, so I'll take another look after updating to beta.11 The workaround I did was to attach to document and look at the HTML to confirm that it actually rendered the svg.
|
Reproduction repo https://github.com/cristijora/vue-test-utils-jest-example
Jest 22
as @dannynicolas says, this is most likely a JSDOM issue since jest 22 uses a newer JSDOM version |
Thanks for the repro 😀 I looked into this, and I'm going to close this as a JSDOM issue—jsdom/jsdom#2128 |
I cannot see how this can be closed with the related jsdom issue. This does not only affect SVGs but also transitions as mentioned above. |
@Prior99 Indeed transitions are also affected but didn't dig too deep into it to get an exact answer why that happens. |
@cristijora is it somehow possible to stub the transitions to have a working workaround except for downgrading to jest 21 until a fix in jsdom or vue-test-utils has been published? |
@Prior99 I didn't spend too much time on that and left my deps to jest 21 |
Is there really nothing which can be done to work around this? The JSDOM issue has been open for over half a year now with no signs of being worked on. In the meantime projects using Vue need to stay 2 major versions of Jest behind. |
Version
1.0.0-beta.10
Reproduction link
Do not have one yet
Steps to reproduce
Upgrade to latest jest > 22.0.0
Try to select svg specific attributes by class
Where the wrapper contains
path
orrect
elementsor
What is expected?
Find method to return the selected elements
What is actually happening?
Find returns no elements. Querying by tag
find('path')
seems to work but it's more of a workaroundI also get a strange issue on a test but haven't isolated it yet to see where the problem actually is
getTransitionInfo
seems to usegetComputedStyles
which probably changed in the new jsdom version that the latest jest is using.The text was updated successfully, but these errors were encountered: