Skip to content
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

Unit Tests: upgrade vue-test-utils to latest version, correct deprecation warning #1029

Merged
merged 5 commits into from Oct 14, 2018
Merged

Unit Tests: upgrade vue-test-utils to latest version, correct deprecation warning #1029

merged 5 commits into from Oct 14, 2018

Conversation

DonNicoJs
Copy link
Contributor

This PR aims to upgrade the version of vue-test-utils to the latest one (which include proper support for scopedSlot testing) and to remove all the warning generated by the now deprecated function shallow

There is only one touch to the the actual code in the dialog component beforeMount hook, where I wrapped the appendChild in a next tick function.
The code was working even without the nextTick ( in the browser ) but only because of timing but it was not passing in the tests ( and is conceptually wrong: https://vuejs.org/v2/api/#beforeMount since in beforeMount the render function is not yet called $el can't be present yet. )

see this fiddle for a better example: https://jsfiddle.net/0n5fmch3/
stringifying this.$elshow empty object, while inside the nextTick the element exist ( is not possible to stringify it when is a real dom since is a circular structure )

Hope this helps!

@codecov
Copy link

codecov bot commented Oct 14, 2018

Codecov Report

Merging #1029 into dev will increase coverage by 0.18%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev    #1029      +/-   ##
==========================================
+ Coverage   33.22%   33.41%   +0.18%     
==========================================
  Files          41       41              
  Lines        1282     1284       +2     
  Branches      402      402              
==========================================
+ Hits          426      429       +3     
+ Misses        834      833       -1     
  Partials       22       22
Impacted Files Coverage Δ
src/components/dialog/Dialog.vue 48.83% <100%> (+2.49%) ⬆️
src/utils/FormElementMixin.js 42.85% <0%> (+2.38%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update db3adf5...8f21083. Read the comment docs.

@jtommy
Copy link
Member

jtommy commented Oct 14, 2018

@lordfuoco great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants