Unit test a Vue component with Jest

Share this video with your friends

Send Tweet

In this lesson, we'll use Jest to unit test a Counter component built with Vue. Vue's baked in testing library provides the necessary functionality to render components, invoke methods, and make assertions.

Additional Resources

https://vue-test-utils.vuejs.org/

Joseph
Joseph
~ 2 years ago

EDIT: Seems like wrapper.element will cause that snapshot to be created. What is causing the snapshot to be saved with each attribute in a new line?