SitePoint
  • Premium
  • Library
  • Community
  • Jobs
  • Blog
LoginStart Free Trial
Testing Vue.js Components with Jest
Testing Vue.js components with Jest
Set up a vue-test sample project
Testing a Component
Testing a Component with vue-test-utils
Adding a Message Component
Testing MessageList with Message Component
The Wrapper object
Properties
Custom Events
Wrapping up
Computed Properties
Watchers
Wrapping Up
Mock External Module Dependencies
Keep mocks externalized
Wrapping Up
Make MessageList slot based
Testing Slots
Testing Named Slots
Testing Contextual Slot Specs
Wrapping
Webpack aliases
Multiple aliases
Other solutions
Wrapping Up
Rethinking in Snapshots
When Snapshot Testing doesn’t help
When a test fails
Conclusion

Community Questions