How it works...

After your recipe is complete, you should note the general structure of your application. You have the application itself in myApp.js, and then you have your tests in test.js. You have some configuration files, such as karma.conf.js and package.json, and you have your libraries inside the node_modules directory. All these files work together to make your application testable.

In a real application, you will probably have more files for the source code and for the test, while the configuration files usually grow much slower.

In this whole setup, you may be wondering how you launch the application itself. After all, there is no HTML and the only thing we launched are tests; we've never seen this Hello World program.

Actually, ...

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.