Skip to Content
Vue.js 2 Cookbook
book

Vue.js 2 Cookbook

by Andrea Passaglia
April 2017
Intermediate to advanced
454 pages
12h 51m
English
Packt Publishing
Content preview from Vue.js 2 Cookbook

How to do it...

Create a new directory and place a file named package.json in it. Inside it, write the following:

{ "name": "learning-code-coverage", "version": "1.0.0"}

This creates an npm project. In the same directory, run the following command to install our dependencies:

npm install vue karma karma jasmine karma-jasmine karma-coverage karma-chrome-launcher --save-dev

The package.json file changes accordingly.

The karma-coverage plugin uses the underlying software, Istanbul, to measure and display the coverage of our tests.

To make the next step a little easier, we will install Karma globally (if you have not already done it). Run the following command:

npm install -g karma

When Karma is installed, run the following command in your ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Vue.js 2

Learning Vue.js 2

Olga Filipova
Pro Vue.js 2

Pro Vue.js 2

Adam Freeman

Publisher Resources

ISBN: 9781786468093Supplemental Content