O'Reilly logo

Hands-On Full Stack Web Development with Aurelia by Erikson Haziz Murrugarra Sifuentes, Diego Jose Arguelles Rojas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Configuring Karma

Now that Karma is installed, we need to configure the following:

  • Jasmine as testing tool
  • Folders with the app code
  • Web browser launcher
  • Reporters

Setting up all the preceding parameters might result in a very time-consuming task, so we will use the Karma executable to configure everything automatically. In the practice-karma folder, run the following command:

$ karma init

This will prompt you a bunch of questions; just press enter to accept all the default configuration, and once everything is done, a karma.conf.js file will be created:

module.exports = function(config) {  config.set({    basePath: '',    frameworks: ['jasmine'],    files: [    ],    exclude: [    ],    preprocessors: {    },    reporters: ['progress'],    port: 9876, colors: true, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required