Home Page Icon
Home Page
Table of Contents for
cover
Close
cover
by Alex Jover Morales
Testing Vue.js Components with Jest
Preface
About the Book
About the Authors
Learning Objectives
Audience
Approach
Chapter 1
Write the First Vue.js Component Unit Test in Jest
Setting Up a vue-test Sample Project
Testing a Component
The Problem with Nested Components
What Is Shallow Rendering?
Testing a Component with Vue-Test-Utils
Chapter 2
Test Deeply Rendered Vue.js Components
Adding a Message Component
Testing MessageList with a Message Component
Chapter 3
Test Styles and Structure
The Wrapper Object
find and findAll
Asserting Structure and Style
Chapter 4
Test Properties and Custom Events
Properties
Testing Property Existence
Asserting Properties Validation
Custom Events
Testing that the Event Click Calls a Method Handler
Testing that the Custom Event message-clicked Is Emitted
Testing that @message-clicked Triggers an Event
Wrapping Up
Chapter 5
Test Computed Properties and Watchers
Computed Properties
Testing Computed Properties
Watchers
Testing Watchers
Wrapping Up
Chapter 6
Test Methods and Mock Dependencies
Mocking External Module Dependencies
Keeping Mocks Externalized
Wrapping Up
Chapter 7
Test Vue.js Slots
Making MessageList Slot-Based
$children and $slots
Testing Slots
Testing Named Slots
Testing Contextual Slot Specs
Wrapping Up
Chapter 8
Enhance Jest Configuration with Module Aliases
Webpack Aliases
Multiple Aliases
Other Solutions
Wrapping Up
Chapter 9
Snapshot Testing
Rethinking in Snapshots
When Snapshot Testing Doesn't Help
When a Test Fails
Conclusion
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
B15653_FM_ePub_Final_SP
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset