Skip to content

False positive prop mutation error #1034

Closed
@MechJosh0

Description

@MechJosh0

Version

1.0.0-beta.25

The issue is also inside 1.0.0-beta.20 which is the real version we use, but we cannot upgrade to .25 due to #1026, but the bug is inside .25 as well. Reproduction repo uses .25.

Reproduction link

https://github.com/MechJosh0/vue-test-utils-prop-error

Steps to reproduce

npm run test:unit

Output

PASS  src/components/__tests__/Container.spec.js
  @/components/Container
    interaction
      √ it should display a child-block (33ms)

  console.error node_modules/vue/dist/vue.runtime.common.js:589
    [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "mode"
    
    found in
    
    ---> <SimpleButton>
           <Anonymous>
             <Root>

What is expected?

No error.

What is actually happening?

Producing an error saying that the prop mode is being mutated when it is in fact not.

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