Skip to content

Bug: Failed setting prop "prefix" on [component] #2035

Closed as not planned
Closed as not planned
@Oleksii14

Description

@Oleksii14

Describe the bug
There is a set-up with Vitest, Vue 3, and Vuetify 3. When running tests for components that contain Vuetify components there appears a warning about the prefix prop. The full warning looks like this:

[Vue warn]: Failed setting prop "prefix" on <v-text-field-stub>: value undefined is invalid. TypeError: Cannot set property prefix of #<Element> which has only a getter
    at patchDOMProp (/vuetify-project/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js:269:17)
    at patchProp (/vuetify-project/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.js:387:9)
    at mountElement (/vuetify-project/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5164:21)
    at processElement (/vuetify-project/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5136:13)
    at patch (vuetify-project/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5056:21)
    at ReactiveEffect.componentUpdateFn [as fn] (/vuetify-project/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5594:21)
    at ReactiveEffect.run (/vuetify-project/node_modules/@vue/reactivity/dist/reactivity.cjs.js:194:25)
    at instance.update (/vuetify-project/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5701:56)
    at setupRenderEffect (/vuetify-project/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5715:9)
    at mountComponent (/vuetify-project/node_modules/@vue/runtime-core/dist/runtime-core.cjs.js:5497:9) 
  at <VTextField> 
  at <HelloWorld ref="VTU_COMPONENT" > 
  at <VTUROOT>

To Reproduce

  1. Clone the repo
  2. yarn install
  3. yarn test:unit

Expected behavior
No warnings appear

Related information:
Created issue in Vuetify repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions