Chapter 13. Testing server-side rendering

This chapter covers

  • Understanding server-side rendering
  • Unit testing server-side rendered Vue components
  • Testing HTTP response codes from a server

Server-side rendering (SSR) is when you render the HTML code of an application on the server before returning it to the client. It’s common to use Vue for SSR, so to be a versatile Vue tester you should learn the techniques to test server-side rendered apps.

SSR is a big topic—too big to go over in a book on testing—so this chapter won’t teach you the specifics of how to add SSR to an app. Instead, I’ve converted the Hacker News app into an SSR app by following the official guide (https://vuejs.org/v2/guide/ssr.html). That way, you can focus on testing, ...

Get Testing Vue.js Applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.