Testing Vue.js applications

With Testing Vue.js Applications , you’ll discover effective testing methods for Vue applications. You’ll enjoy author Edd Yerburgh’s engaging style and fun real-world examples as you learn to use the Jest framework to run tests for a Hacker News application built with Vue, Vuex, and Vue Router. Thi...

Descripción completa

Detalles Bibliográficos
Otros Autores: Yerburgh, Edd, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Shelter Island, New York : Manning [2018]
Edición:1st edition
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009630452606719
Tabla de Contenidos:
  • Intro
  • Copyright
  • Brief Table of Contents
  • Table of Contents
  • The frontend testing pyramid
  • Preface
  • Acknowledgments
  • About this book
  • Who should read this book
  • How this book is organized
  • About the code
  • Online resources
  • Book forum
  • About the author
  • About the cover illustration
  • Chapter 1. Introduction to testing Vue applications
  • 1.1. Defining testing
  • 1.2. Testing overview
  • 1.3. Writing a Hacker News application
  • 1.4. Vue testing overview
  • Summary
  • Chapter 2. Creating your first test
  • 2.1. Understanding a Vue project structure
  • 2.2. Introduction to Jest
  • 2.3. Introduction to Vue Test Utils
  • 2.4. Debugging tests with Chrome Debugger
  • Summary
  • Exercises
  • Chapter 3. Testing rendered component output
  • 3.1. Creating test specifications
  • 3.2. Testing rendered text
  • 3.3. Testing DOM attributes
  • 3.4. Testing how many components are rendered
  • 3.5. Testing props
  • 3.6. Testing classes
  • 3.7. Testing style
  • 3.8. When to test rendered component output
  • Summary
  • Exercises
  • Chapter 4. Testing component methods
  • 4.1. Testing public and private component methods
  • 4.2. Testing timer functions
  • 4.3. Adding properties to the Vue instance
  • 4.4. Mocking code
  • 4.5. Mocking module dependencies
  • Summary
  • Exercises
  • Chapter 5. Testing events
  • 5.1. Testing native DOM events
  • 5.2. Testing custom Vue events
  • 5.3. Testing input forms
  • 5.4. Understanding the limitations of jsdom
  • Summary
  • Exercises
  • Chapter 6. Understanding Vuex
  • 6.1. Understanding state
  • 6.2. The problem Vuex solves
  • 6.3. Understanding the Vuex store
  • Summary
  • Chapter 7. Testing Vuex
  • 7.1. Understanding the store design
  • 7.2. Adding Vuex to the project
  • 7.3. Testing Vuex store parts separately
  • 7.4. Testing a Vuex store instance
  • 7.5. Testing Vuex in components
  • Summary.
  • Exercises
  • Chapter 8. Organizing tests with factory functions
  • 8.1. Understanding factory functions
  • 8.2. Creating a store factory function
  • 8.3. Overwriting default options in factory functions
  • 8.4. Creating a wrapper factory function
  • Summary
  • Exercises
  • Chapter 9. Understanding Vue Router
  • 9.1. Understanding routing
  • Summary
  • Chapter 10. Testing Vue Router
  • 10.1. Testing router properties
  • 10.2. Testing the RouterLink component
  • 10.3. Using Vuex with Vue Router
  • Summary
  • Exercises
  • Chapter 11. Testing mixins and filters
  • 11.1. Testing mixins
  • 11.2. Testing filters
  • Summary
  • Exercises
  • Chapter 12. Writing snapshot tests
  • 12.1. Understanding snapshot tests
  • 12.2. Adding snapshot tests to your workflow
  • Summary
  • Exercises
  • Chapter 13. Testing server-side rendering
  • 13.1. Understanding server-side rendering
  • 13.2. Testing server-side rendered components
  • 13.3. Testing status codes with SuperTest
  • 13.4. Testing SSR implicitly
  • Summary
  • Exercises
  • Chapter 14. Writing end-to-end tests
  • 14.1. Understanding end-to-end tests
  • 14.2. Adding Nightwatch to a project
  • 14.3. Writing end-to-end tests with Nightwatch
  • 14.4. Running end-to-end tests in multiple browsers
  • Summary
  • Where to go from here
  • Appendix A. Setting up your environment
  • A.1 Choosing a text editor
  • A.2 Using the command line
  • A.3 Installing Chrome
  • A.4 Installing the Vue.js devtools Chrome extension
  • A.5 Installing Node and npm
  • A.6 Installing Git
  • A.7 Starting a new chapter
  • A.8 Starting chapter 5
  • A.9 Installing the Java Development Kit
  • Appendix B. Running the production build
  • B.1 Understanding the production build
  • B.2 Running the Hacker News production build locally
  • Appendix C. Exercise answers
  • Chapter 2
  • Chapter 3
  • Chapter 4
  • Chapter 5
  • Chapter 7
  • Chapter 8.
  • Chapter 10
  • Chapter 11
  • Chapter 12
  • Chapter 13
  • Index
  • List of Figures
  • List of Tables
  • List of Listings.