Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Karma not picking the changes, have to run tests twice

I am running Jasmine tests on Karma (latest, 0.12.14) from IntelliJ IDEA (latest, 13.1.2) on OS X.

IntelliJ just uses Karma plugin that points to my karma installation: /usr/local/lib/node_modules/karma

The problem is that Karma watcher doesn't pick new changes from JS files. When I run tests again, everything is fine. It's not a huge issue (they run pretty fast), but it's annyoing to always run tests twice after you do a change.

Anybody experienced similar issue?

like image 481
Xorty Avatar asked Apr 29 '14 10:04

Xorty


1 Answers

Add the following property to your karma.conf.js file:

usePolling: true

I put it after the autoWatch flag.

Reference: AutoWatch doesn't work #895

like image 56
Gordon Avatar answered Oct 14 '22 06:10

Gordon