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

Launching the test runner

Now that we have our test code and a Calculator object, it's time to launch Karma to execute our test. Open the command line and in the practice-karma root folder, execute the following command:

./node_modules/karma/.bin/karma start karma.conf.js

The preceding command will output a bunch of logs, while it opens a new window in your Chrome web browser and executes your test into the web page recently started. This page is opened in Chrome because it is configured in the karma.conf.js. Consider this example:

$ ./node_modules/karma/bin/karma start karma.conf.js10 12 2017 12:12:43.049:WARN [karma]: No captured browser, open http://localhost:9876/10 12 2017 12:12:43.059:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/ ...

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