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

fix: disable stubs for built-in components on shallow #1409

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

freakzlike
Copy link
Collaborator

fix #929

I came across an equal issue when using shallow: true but still want to use the real teleport. This ensures to use the real component when using

const wrapper = mount(Comp, {
  shallow: true,
  global: {
    stubs: {
      transition: false,
      teleport: false,
      'transition-group': false
    }
  }
})

@netlify
Copy link

netlify bot commented Apr 8, 2022

Deploy Preview for vue-test-utils-docs ready!

Name Link
🔨 Latest commit 6a37360
🔍 Latest deploy log https://app.netlify.com/sites/vue-test-utils-docs/deploys/62504382c3e2040008ace852
😎 Deploy Preview https://deploy-preview-1409--vue-test-utils-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@cexbrayat cexbrayat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I'll let @lmiller1990 take a look and merge

@cexbrayat cexbrayat requested a review from lmiller1990 April 13, 2022 10:24
Copy link
Member

@lmiller1990 lmiller1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine - I think it's weird we have so much special code around shallow - I generally just use mount for this reason 🤷

@freakzlike
Copy link
Collaborator Author

You are right. There are also quiet some open issues related to shallow and stubs. I think some things can be simplified or maybe ( for the future) VTU only offers some API for plugins.

@lmiller1990 lmiller1990 merged commit eb82845 into vuejs:main Apr 19, 2022
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.

Unable to stub transition component
3 participants