How to do it...

Jasmine is a library composed of various modules. To make it work, you need to install a few dependencies related to Jasmine. I will assume that you are using JSFiddle to follow along. If you are using npm or other methods instead, you should be able to derive what you need to change as the code will be simple in principle.

To install Jasmine in your app, you will need four different dependencies, of which one is just for CSS styling.

The four files are (in order of dependence):

  • jasmine.css
  • jasmine.js
  • jasmine-html.js (which depends on the preceding js)
  • boot.js (which depends on the preceding js)

You should be able to find all these files on CDNJS or other CDNs. Install them in the order shown, or they won't work properly. ...

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

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