Getting ready

For this recipe, you should have a test setup already up and working; complete the Using Jasmine for testing Vue recipe if you don't know what that means.

I will assume that you have Jasmine installed and you can perform tests. Basically, all you need is a web page (JSFiddle is okay) and these four dependencies installed:

  • jasmine.css
  • jasmine.js
  • jasmine-html.js
  • boot.js

If you are using JSFiddle or adding them manually, remember to add them in the specified order. Find the link to these files in the Using Jasmine for testing Vue recipe.

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.