You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test('Foo',()=>{it('fetches async when a button is clicked',(done)=>{constwrapper=shallowMount(Foo)wrapper.find('button').trigger('click')wrapper.vm.$nextTick(()=>{expect(wrapper.vm.value).toBe('value')done()})})})
What is expected?
describe('Foo',()=>{it('fetches async when a button is clicked',(done)=>{constwrapper=shallowMount(Foo)wrapper.find('button').trigger('click')wrapper.vm.$nextTick(()=>{expect(wrapper.vm.value).toBe('value')done()})})})ordescribe('Foo',()=>{test('fetches async when a button is clicked',(done)=>{constwrapper=shallowMount(Foo)wrapper.find('button').trigger('click')wrapper.vm.$nextTick(()=>{expect(wrapper.vm.value).toBe('value')done()})})})
What is actually happening?
test('Foo',()=>{it('fetches async when a button is clicked',(done)=>{constwrapper=shallowMount(Foo)wrapper.find('button').trigger('click')wrapper.vm.$nextTick(()=>{expect(wrapper.vm.value).toBe('value')done()})})})
There is a problem here, you can't use test and it at the same time, these two methods can't be used at the same time.
The text was updated successfully, but these errors were encountered:
Yes you're right, there's a mistake. These should just use test like the rest of the documentation.
It should be refactored to this:
test('fetches async when a button is clicked',(done)=>{constwrapper=shallowMount(Foo)wrapper.find('button').trigger('click')wrapper.vm.$nextTick(()=>{expect(wrapper.vm.value).toBe('value')done()})})
Version
1.0.0-beta.24
Reproduction link
https://vue-test-utils.vuejs.org/zh/guides/#%E6%B5%8B%E8%AF%95%E5%BC%82%E6%AD%A5%E8%A1%8C%E4%B8%BA
Steps to reproduce
What is expected?
What is actually happening?
There is a problem here, you can't use test and it at the same time, these two methods can't be used at the same time.
The text was updated successfully, but these errors were encountered: