javascript - testing - karma


what it is ?

A test runner for js tests. Can ran tests described with a lots of frameworks (Jasmine, Mocha, QUnit, ...)

Karma config file

Browsers config

export CHROME_BIN=/usr/bin/google-chrome-stable

IntelliJ integration

karma & grunt

Use grunt-karma npm module. A sample grunt task is needed :

karma: {
  unit: {
      configFile: 'karma.conf.js'

karma.conf.js should be generated with the karma command line tool.

Install launcher, karma-chrome-launcher to use Chrome, or karma-phantomjs-launcher for a silent execution.

karma & phantomjs

A big number of tests can cause phantomjs to crash, it is worse with a coverage preprocessor.

There is nothing to do instead of using something else or split the tests suites into several pieces, but coverage tools needs the tests to be ran to work ...


phantomjs could be considered dead :

phantomjs repo issues

mailing list

headless chrome alternative

results for ""

    No results matching ""