Testing components will throw a Cannot read properties of undefined (reading 'unstyled')
error
#4360
Labels
Component: Test
Issue or pull request is related to Component Testing
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
Running tests with the PrimeVue 3.32.1 (likely happens with any PrimeVue version that has the new
unstyled
feature, even if you do not need to use it for it to break) will throw an error due tounstyled
property being access on a possibleundefined
config object.Reproducer
https://codesandbox.io/p/sandbox/primevue-test-bug-forked-6w4v6f?file=/src/__tests__/App.spec.js:1,1
PrimeVue version
3.32.1
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
primevue/button
for example)The test will not run and throw the error
TypeError: Cannot read properties of undefined (reading 'unstyled')
Expected behavior
The tests should pass and create a new snapshot.
The text was updated successfully, but these errors were encountered: