Skip to content

Vuex example correction #81

Closed
Closed
@lmiller1990

Description

@lmiller1990

Hi,

I used avoriaz previously, now trying this. I notice in this page https://vue-test-utils.vuejs.org/en/guides/using-with-vuex.html

The example says:

it('calls store action actionClick when button is clicked', () => {
    const wrapper = mount(Actions, { store })
    wrapper.find('button')[0].trigger('click')
    expect(actions.actionClick.calledOnce).toBe(true)
  })

I didn't run this example sample, but one very similar - my component also only has one button, and two <input>. I had to go wrapper.find('button').trigger('click'), without the [0] index.

Maybe this is just a slight error - I think avoriaz would use the [0] regardless, but vue-test-utils does it a little different?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions