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

TransitionStub doesn't work with mount({ template: '...' }) #567

Closed
denisinvader opened this issue Apr 27, 2018 · 1 comment
Closed

TransitionStub doesn't work with mount({ template: '...' }) #567

denisinvader opened this issue Apr 27, 2018 · 1 comment

Comments

@denisinvader
Copy link

Version

1.0.0-beta.15

Reproduction link

https://github.com/denisinvader/vtu-transition-issue/tree/master

Steps to reproduce

Use the transition in any component. Then tests mount this component by template.

// ...

const wrapper = mount({
  components: { 'test-component': TestComponent },
  template: '<test-component />'
});

// ...

Then update data in wrapper (or trigger an action) that will update transition state.

What is expected?

transition component works synchronously - test pass

What is actually happening?

transition component works asynchronously and element styles equals to "display: none" - test fail


May be it's not the best way - mount testing component by template in configuration, but in a production app I want to test how component works with v-model and updates parent state

@denisinvader
Copy link
Author

denisinvader commented Apr 27, 2018

Also it seems like not working when <transition> in an importing component. For example: if I test a HOC which renders another component with a transition, transition works asynchronously (transitionStub doesn't apply).

Adding stubs: { transition: TransitionStub } in mount doesn't help.

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

No branches or pull requests

1 participant