javascript - Force Karma to take updated spec.js file from disk -


i'm writing test specs angular controllers, this:

it('should have method add blank category', function () {     var controller = categorycontrollercreator();     $scope.allcategories = {};     $scope.addcategorystart();     expect($scope.allcategories["id-1"]).not.tobeundefined(); }); 

then, need test see if works. run:

karma start 

in command window. after realize need use scope instead of $scope, save spec.js file, ctrl + c in karma window, re-open browser, press debug , try again. goes on , on when i'm writing test specs.

can force karma take latest spec.js file disk without having me repeat process?

use autowatch swtich when run it:

--autowatch 

and can tell wait set amount of time before runs autowatchbatchdelay:

autowatchbatchdelay:500 

it's in config options: http://karma-runner.github.io/0.13/config/configuration-file.html


Comments