karma.conf.js

Reading time ~1 minute

To configure Karma, the test runner, there are karma.conf.js and karma-test-shim.js.

karma.conf.js

First, the ‘framework’ is set to Jasmine. Then karma-jasmine, karma-chrome-launcher, and karma-htmlfile-reporter are set as required plugins and ‘customLaunchers’ is set to launch the Chrome browser.

Next there is a big block that tells which files are to be sent to the browser and which are to be served by the Karma webserver.

The next interesting configuration is for the reporters which is set to ‘progress’ and also ‘html’ which is configured in the next block and is set to output a tests.html file at the end of the test run.

Lastly, some miscellaneous items like the the port, colors (for reporters and logs), logLevel, autoWatch (for automatically running the tests if a file changes, the browser (Chrome), and singleRun which tells Karma to run the tests once and then exit (false).

Perils of a Family-First Software Developer

I've just survived a RIF, my skills and tool set are built around technologies that were modern 10 years ago, my interviewing skills have...… Continue reading

AWS CodeStar and TypeScript - Part 3

Published on May 28, 2017

AWS CodeStar and TypeScript - Part 2

Published on May 17, 2017