bug: vue jest utils, shallowMount does not work when property values are symbols
See original GitHub issuePrerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
Current Behavior
After bumping Ionic Vue from v5 to v6 RC, all my tests that are shallowMount
ed fail with the following error:
Expected Behavior
This didn’t happen with v5, and I expect it to work in v6 as well
Steps to Reproduce
Run an Ionic 6 app test with shallowMount
Code Reproduction URL
No response
Ionic Info
Ionic:
Ionic CLI : 6.17.1
Utility:
cordova-res : not installed globally native-run : not installed globally
System:
NodeJS : v17.0.1 npm : 8.1.0 OS : macOS Monterey
Additional Information
Also see https://github.com/vuejs/vue-test-utils/issues/1833
Issue Analytics
- State:
- Created 2 years ago
- Comments:29 (8 by maintainers)
Top Results From Across the Web
mount() and shallowMount() from @vue/test-utils throw ...
The error means that mount tries to read components property of ActuatorController and fails. Components are default exports in Vue single ...
Read more >Common Tips | Vue Test Utils
Notice that using shallowMount will make the component under testing different from the component you run in your application – some of its...
Read more >An introduction to test-driven development with Vue.js
We mounted our ColorPicker component and wrote a test that expects to find items with a background color matching the colors passed as...
Read more >How to set up unit testing in NativeScript Vue - Bryan Lee
The Vue way of Jest + Vue Test Utils does not work out of the box with ... Jest is the test runner...
Read more >Vue Testing with Vue Test Utils - YouTube
In this video we will cover Vue testing with Vue Test Utils which uses Jest under the hood.Timeline:0:00 - Setup10:37 - Test Structure17:15 ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We actually found a way to fix this in Vue core if anyone is curious: https://github.com/vuejs/vue-next/pull/4964
@lmiller1990 great! By the way, there is also an open issue for this in VTU v1 that would be fixed by backporting this: https://github.com/vuejs/vue-test-utils/issues/1833