8000 when the prop name of the component is an array, throw error from 1.1.4 and later · Issue #1854 · vuejs/vue-test-utils · GitHub
[go: up one dir, main page]

Skip to content
when the prop name of the component is an array, throw error from 1.1.4 and later #1854
Closed
@blusoul

Description

@blusoul

Subject of the issue

My unit tests started breaking from 1.1.4 and later

Steps to reproduce

    const wrapper = mount(
      {
        props: {
          name: ["start", "end"]
        },
        template: `<Wrapper><Inner :name="name" /></Wrapper>`
      },
      {
        stubs: {
          Wrapper,
          Inner
        }
      }
    );

    // name is array
    // from 1.1.4 throw error: TypeError: str.replace is not a function
    console.log(wrapper.findComponent(Wrapper));

vue-test
Demo

Expected behaviour

When i downgrade to 1.1.3, it is ok, but findComponent({name: 'xxx'}) has error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0