-
Notifications
You must be signed in to change notification settings - Fork 668
Buefy issue inside vue-test-utils #982
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
Comments
Forgot to add the particular error, it's done now... |
The issue is caused by Vue Test Utils stubbing the Transition component. For now, you can fix the error by telling Vue Test Utils not to stub Transition: const msg = 'new message'
const wrapper = mount(HelloWorld, {
propsData: { msg },
stubs: {
transition: false
}
})
expect(wrapper.find({ ref: 'a1b' })) Unfortunately this means you will sometimes need to use it('renders props.msg when passed', (done) => {
const wrapper = mount(HelloWorld, {
stubs: {
transition: false
}
})
expect(wrapper.find({ ref: 'a1b' }))
wrapper.trigger('click')
Vue.nextTick(() => {
assert(wrapper.text()).toBe('some text')
done()
})
}) This bug with the Transition stub will probably be fixed in the future after Vue 2.5.18 is released, by removing the Transition stub when Vue is running in sync mode. Alternatively we could fix the TransitionStub component stub to stop the error. |
That appears to fix it, thank you for providing a workaround in the meantime! |
This is the same issue reported in #958, so I'll close this in favor of that issue. |
Version
1.0.0-beta.25
Reproduction link
https://github.com/EIREXE/buefy-bug
Steps to reproduce
What is expected?
That the test works without any extra error
What is actually happening?
The test errors out (and events such as @click don't work)
This is a vue-test-utils exclusive error, so I believe buefy is not to blame here.
The text was updated successfully, but these errors were encountered: