If I run:
karma start karma.conf.js --auto-watch --browsers Chrome --runner-port 9090 --no-single-run
Karma doesn't react to file changes. Here are relevant files:
package.json:
{
"name": "test-app",
"version": "0.1.0",
"devDependencies": {
"connect-modrewrite": "0.5.11",
"findup-sync": "0.1.2",
"grunt": "0.4.2",
"grunt-angular-templates": "0.5.1",
"grunt-autoprefixer": "0.6.4",
"grunt-check-dependencies": "0.3.0",
"grunt-concurrent": "0.4.3",
"grunt-continue": "0.0.1",
"grunt-contrib-clean": "0.5.0",
"grunt-contrib-compass": "0.7.0",
"grunt-contrib-concat": "0.3.0",
"grunt-contrib-connect": "0.6.0",
"grunt-contrib-copy": "0.5.0",
"grunt-contrib-htmlmin": "0.1.3",
"grunt-contrib-jshint": "0.7.2",
"grunt-contrib-uglify": "0.3.1",
"grunt-contrib-watch": "0.5.3",
"grunt-csso": "0.5.3",
"grunt-ddescribe-iit": "0.0.4",
"grunt-defs": "0.6.1",
"grunt-jsonlint": "1.0.4",
"grunt-karma": "0.6.2",
"grunt-merge-conflict": "0.0.2",
"grunt-newer": "0.6.1",
"grunt-ng-annotate": "0.0.4",
"grunt-notify": "0.2.17",
"grunt-protractor-runner": "0.2.1",
"grunt-rev": "0.1.0",
"grunt-shell": "0.6.2",
"grunt-usemin": "2.0.2",
"jasmine-reporters": "0.2.1",
"karma": "0.10.9",
"karma-chrome-launcher": "0.1.2",
"karma-coverage": "0.1.4",
"karma-firefox-launcher": "0.1.3",
"karma-jasmine": "0.1.5",
"karma-junit-reporter": "0.2.1",
"karma-ng-json2js-preprocessor": "0.0.5",
"karma-opera-launcher": "0.1.0",
"libxmljs": "0.8.1",
"load-grunt-tasks": "0.2.1",
"protractor": "0.16.1"
}
}
karma.conf.js:
'use strict';
module.exports = function (config) {
require('./karma-shared.conf')(config);
config.set({
// list of files / patterns to load in the browser
files: config.files.concat([
'app/vendor/l20n-*/l20n.js',
'app/vendor/jquery-*/jquery.js',
'app/vendor/lodash-*/lodash.custom.js',
'app/vendor/modernizr-*/modernizr-custom.js',
'app/vendor/bootstrap-*/bootstrap.js',
'app/vendor/bootstrap-tagsinput/bootstrap-tagsinput.js',
'app/vendor/typeahead.js-*/typeahead.js',
'app/vendor/seadragon/seadragon.js',
'app/vendor/angular-*/angular/angular.js',
'app/vendor/angular-*/angular-*/angular-*.js',
'app/vendor/placeholders-*/placeholders-*.js',
'app/vendor/ng-l20n/ng-l20n.js',
'app/vendor/google-analytics/tracking-code.js',
'app/vendor/angulartics-0.8.5/angulartics.js',
'app/vendor/ng-tags-input-8d243e5ad0-fork/ng-tags-input.js',
'app/lib/polyfill.defs.js',
'app/lib/key_codes.defs.js',
'app/lib/jquery.dotdotdot-1.5.6-modified.defs.js',
'app/cbn-modules/**/*.defs.js',
'app/app.defs.js',
'test/templates.js',
]).concat(config.bottomFiles),
exclude: config.exclude.concat([
'app/**/*.min.js',
]),
});
};
karma-shared.conf.js:
'use strict';
module.exports = function (config) {
var preprocessors = config.preprocessors;
preprocessors['**/*.json'] = 'json2js';
config.set({
frameworks: ['jasmine'],
basePath: '',
files: [
'test/settings.js',
],
bottomFiles: [
'test/mocks-inlined/*.json',
'test/vendor/**/*.js',
'test/{lib,mock,unit}/**/*.defs.js',
],
exclude: [],
preprocessors: preprocessors,
plugins: config.plugins.concat([
'karma-ng-json2js-preprocessor',
]),
reporters: ['progress'],
port: 8080,
runnerPort: 9100,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['Chrome', 'Firefox'],
captureTimeout: 60000,
singleRun: true,
});
};
Watched *.defs.js files are generated via grunt-defs. Once a file is generated, Karma doesn't pick up the change and doesn't dispatch the tests.
@mzgol Can you run it with --log-level debug and grep the "DEBUG [watcher]" logs? What version of Karma are you using?
I'm having the same issue:
DEBUG [config]: Loading config /home/sebastian/angular-seed/config/karma.conf.js
DEBUG [plugin]: Loading plugin karma-chrome-launcher.
DEBUG [plugin]: Loading plugin karma-firefox-launcher.
DEBUG [plugin]: Loading plugin karma-jasmine.
INFO [karma]: Karma v0.12.0 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
DEBUG [temp-dir]: Creating temp dir at /tmp/karma-90772814
DEBUG [launcher]: google-chrome --user-data-dir=/tmp/karma-90772814 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --start-maximized http://localhost:9876/?id=90772814
DEBUG [watcher]: Excluded file "/home/sebastian/angular-seed/app/lib/angular/angular-animate.min.js"
DEBUG [watcher]: Excluded file "/home/sebastian/angular-seed/app/lib/angular/angular-cookies.min.js"
DEBUG [watcher]: Excluded file "/home/sebastian/angular-seed/app/lib/angular/angular-loader.js"
DEBUG [watcher]: Excluded file "/home/sebastian/angular-seed/app/lib/angular/angular-loader.min.js"
DEBUG [watcher]: Excluded file "/home/sebastian/angular-seed/app/lib/angular/angular-resource.min.js"
DEBUG [watcher]: Excluded file "/home/sebastian/angular-seed/app/lib/angular/angular-route.min.js"
DEBUG [watcher]: Excluded file "/home/sebastian/angular-seed/app/lib/angular/angular-sanitize.min.js"
DEBUG [watcher]: Excluded file "/home/sebastian/angular-seed/app/lib/angular/angular-scenario.js"
DEBUG [watcher]: Excluded file "/home/sebastian/angular-seed/app/lib/angular/angular-touch.min.js"
DEBUG [launcher]: Process Chrome exited with code -1
ERROR [launcher]: Cannot start Chrome
Can not find the binary google-chrome
Please set env variable CHROME_BIN
DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-90772814
DEBUG [launcher]: Chrome failed (cannot start). Not restarting.
DEBUG [watcher]: Resolved files:
/home/sebastian/angular-seed/node_modules/karma-jasmine/lib/jasmine.js
/home/sebastian/angular-seed/node_modules/karma-jasmine/lib/adapter.js
/home/sebastian/angular-seed/app/lib/angular/angular.js
/home/sebastian/angular-seed/app/lib/angular/angular-animate.js
/home/sebastian/angular-seed/app/lib/angular/angular-cookies.js
/home/sebastian/angular-seed/app/lib/angular/angular-resource.js
/home/sebastian/angular-seed/app/lib/angular/angular-route.js
/home/sebastian/angular-seed/app/lib/angular/angular-sanitize.js
/home/sebastian/angular-seed/app/lib/angular/angular-touch.js
/home/sebastian/angular-seed/test/lib/angular/angular-mocks.js
/home/sebastian/angular-seed/app/js/app.js
/home/sebastian/angular-seed/app/js/controllers.js
/home/sebastian/angular-seed/app/js/directives.js
/home/sebastian/angular-seed/app/js/filters.js
/home/sebastian/angular-seed/app/js/services.js
/home/sebastian/angular-seed/test/unit/controllersSpec.js
DEBUG [watcher]: Watching "/home/sebastian/angular-seed/app/lib/angular"
DEBUG [watcher]: Watching "/home/sebastian/angular-seed/test/lib/angular/angular-mocks.js"
DEBUG [watcher]: Watching "/home/sebastian/angular-seed/app/js"
DEBUG [watcher]: Watching "/home/sebastian/angular-seed/test/unit"
DEBUG [watcher]: Add file "/home/sebastian/angular-seed/test/lib/angular/angular-mocks.js" ignored. Already in the list.
DEBUG [watcher]: Add file "/home/sebastian/angular-seed/app/js/controllers.js" ignored. Already in the list.
DEBUG [watcher]: Add file "/home/sebastian/angular-seed/app/js/app.js" ignored. Already in the list.
DEBUG [watcher]: Add file "/home/sebastian/angular-seed/app/js/directives.js" ignored. Already in the list.
DEBUG [watcher]: Add file "/home/sebastian/angular-seed/app/js/filters.js" ignored. Already in the list.
DEBUG [watcher]: Add file "/home/sebastian/angular-seed/app/js/services.js" ignored. Already in the list.
DEBUG [watcher]: Add file "/home/sebastian/angular-seed/test/unit/controllersSpec.js" ignored. Already in the list.
DEBUG [web-server]: upgrade /socket.io/1/websocket/EQeE6Gg8hS2i5d5jVEv9
DEBUG [karma]: A browser has connected on socket EQeE6Gg8hS2i5d5jVEv9
INFO [Chromium 32.0.1700 (Ubuntu)]: Connected on socket EQeE6Gg8hS2i5d5jVEv9 with id 80543638
INFO [watcher]: Changed file "/home/sebastian/angular-seed/test/unit/controllersSpec.js".
DEBUG [karma]: List of files has changed, trying to execute
DEBUG [karma]: All browsers are ready, executing
DEBUG [web-server]: serving: /home/sebastian/angular-seed/node_modules/karma/static/context.html
Chromium 32.0.1700 (Ubuntu) TodoController Test should return notes array with two elements initially and then add one FAILED
ReferenceError: $controller is not defined
at null.<anonymous> (/home/sebastian/angular-seed/test/unit/controllersSpec.js:21:18)
at Object.invoke (/home/sebastian/angular-seed/app/lib/angular/angular.js:3760:17)
at workFn (/home/sebastian/angular-seed/test/lib/angular/angular-mocks.js:2143:20)
Error: Declaration Location
at window.inject.angular.mock.inject (/home/sebastian/angular-seed/test/lib/angular/angular-mocks.js:2128:25)
at null.<anonymous> (/home/sebastian/angular-seed/test/unit/controllersSpec.js:17:5)
at /home/sebastian/angular-seed/test/unit/controllersSpec.js:1:1
Chromium 32.0.1700 (Ubuntu): Executed 1 of 1 (1 FAILED) ERROR (6.568 secs / 3.567 secs)
Karma recognizes the file change only once for every file it's watching.
Edit: It works with version 0.10.10
It happens to me too. Version 0.12.0. It recognize the file change only once. I have a minimal setup:
// banana.js
function banana () {
return "banana"
}
// test/spec/banana.js
describe('banana', function () {
it('should return banana', function () {
expect(banana()).toEqual('banana');
})
})
// karma.conf.js autogenerated by karma init
// Karma configuration
// Generated on Sat Mar 15 2014 20:19:38 GMT+0100 (CET)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
// list of files / patterns to load in the browser
files: [
'*.js',
'test/**/*.js'
],
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],
// web server port
port: 9876,
// enable / disable colors in the output (reporters and logs)
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// enable / disable watching file and executing tests whenever any file changes
autoWatch: true,
// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: false
});
};
$ karma start --log-level debug
DEBUG [config]: Loading config /home/msuppo/projects/prova/karma.conf.js
DEBUG [plugin]: Loading karma-* from /home/msuppo/projects/prova/node_modules
DEBUG [plugin]: Loading plugin /home/msuppo/projects/prova/node_modules/karma-chrome-launcher.
DEBUG [plugin]: Loading plugin /home/msuppo/projects/prova/node_modules/karma-jasmine.
INFO [karma]: Karma v0.12.0 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
DEBUG [temp-dir]: Creating temp dir at /tmp/karma-33540699
DEBUG [launcher]: google-chrome --user-data-dir=/tmp/karma-33540699 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --start-maximized http://localhost:9876/?id=33540699
DEBUG [watcher]: Excluded file "/home/msuppo/projects/prova/karma.conf.js"
DEBUG [watcher]: Resolved files:
/home/msuppo/projects/prova/node_modules/karma-jasmine/lib/jasmine.js
/home/msuppo/projects/prova/node_modules/karma-jasmine/lib/boot.js
/home/msuppo/projects/prova/node_modules/karma-jasmine/lib/adapter.js
/home/msuppo/projects/prova/banana.js
/home/msuppo/projects/prova/test/spec/banana.js
DEBUG [watcher]: Watching "/home/msuppo/projects/prova"
DEBUG [web-server]: serving: /home/msuppo/projects/prova/node_modules/karma/static/client.html
DEBUG [web-server]: serving: /home/msuppo/projects/prova/node_modules/karma/static/karma.js
DEBUG [web-server]: upgrade /socket.io/1/websocket/XjsecSz38EAtAjSzN9Nd
DEBUG [karma]: A browser has connected on socket XjsecSz38EAtAjSzN9Nd
INFO [Chrome 32.0.1700 (Linux)]: Connected on socket XjsecSz38EAtAjSzN9Nd with id 33540699
DEBUG [launcher]: Chrome (id 33540699) captured in 1.528 secs
DEBUG [karma]: All browsers are ready, executing
DEBUG [web-server]: serving: /home/msuppo/projects/prova/node_modules/karma/static/context.html
DEBUG [web-server]: serving (cached): /home/msuppo/projects/prova/node_modules/karma-jasmine/lib/jasmine.js
DEBUG [web-server]: serving (cached): /home/msuppo/projects/prova/node_modules/karma-jasmine/lib/boot.js
DEBUG [web-server]: serving (cached): /home/msuppo/projects/prova/node_modules/karma-jasmine/lib/adapter.js
DEBUG [web-server]: serving (cached): /home/msuppo/projects/prova/banana.js
DEBUG [web-server]: serving (cached): /home/msuppo/projects/prova/test/spec/banana.js
Chrome 32.0.1700 (Linux): Executed 1 of 1 SUCCESS (0.006 secs / 0.001 secs)
INFO [watcher]: Changed file "/home/msuppo/projects/prova/banana.js".
DEBUG [karma]: List of files has changed, trying to execute
DEBUG [karma]: All browsers are ready, executing
DEBUG [web-server]: serving: /home/msuppo/projects/prova/node_modules/karma/static/context.html
Chrome 32.0.1700 (Linux): Executed 1 of 1 SUCCESS (0.007 secs / 0 secs)
Here's what breaking it, imho:
https://github.com/karma-runner/karma/commit/e88fbc24dd34e7976cae2547bad07e6f044a768b
If I set usePolling to true it works.
Now I just have to understand why it doesn't work with usePolling=false;
I think I'm gonna cry... Seriously. Can some OS finally make the file watching to work?
Sounds like we should enable polling again, on all platforms (currently it is disabled on Mac where fsevents are buggy as well). I thought this worked on Linux ;-) I mean, I tested it a lot...
@matteosuppo @mzgol @BassT what version of Node are you guys on?
Can you please try latest 0.10?
In the meantime, set usePolling: true as @matteosuppo did.
I'm using the latest version
node -v
v0.10.26
By the way it seems like Sublime Text could be the culprit, for me. If it's shut down, the file changes are detected. Maybe it is blocking them somehow?
I digged up this: http://stackoverflow.com/questions/20634684/what-is-sublime-text-doing-when-i-save-a-file
The problem for me was solved by changing "atomic_save": false in the settings. I don't know if it's worth of a FAQ
Can other people having this issue try changing the Sublime settings?
It's still weird, even if Sublime does atomic_save: true, Karma should notice, it might just be seen as "remove" + "add" (instead of "change").
node -v
v0.10.26
karma 0.10.10 works fine for me. I'm gonna try 0.12 asap with changed sublime settings, though I recall that it wasn't working when I saved files with eclipse either.
It starts picking up changes again after setting atomic_save: false in sublime. Nice to have a workaround at least :-)
Wait, @BassT are you saying it works with karma 0.10.x but not with 0.12? Then, it's probably the usePolling config, that's the only thing that has changed, AFAIK. You can try to set it to true (polling, can give you high CPU consumption if you watch many files) / false (OS events, buggy, but cheap; long term THE solution).
If anybody interested in this, take a look at https://github.com/karma-runner/karma/issues/974
Yup, atomic_save": false does the trick.
I had the same issue on Intellij. It looks like you have to disable Use 'safe write' setting.
"atomic_save": false worked for me as well, using Sublime 3 and Ubuntu 12.04.
Me too. Not using Sublime.
Node: v0.10.25
Karma: v0.12.16
usePolling: true fixes it.
I have a possibly different setup where I'm running off a NAS and run node on unix (which obviously mounts the nas drive) but run WebStorm through Windows (ditto).
Same for me sublime 3, usePolling:true restores previous behaviour, but using atomic_save: false in sublime instead for performance.
"atomic_save": false solved the autoWatch-issue but the test-runs where inconsistent. When I change my spec and saved the code, it executes correct. Saving once more without any changes runs test before change. Saving several times without changes runs test before and after change in turn?!?
Deleting "atomic_save": false and usePolling: true heals everything.
Same for me still using sublime 2 where there seems to be no atomic_save: .
Updating karma config to with usePolling: true seems to solve autoWatch-once-issue.
I'm having the same issue. I am seeing inconsistent behavior too -- some runs will re-run tests when I touch files in src/, other runs do not, with no changes to config.
As of most recent runs, setting usePolling: true is working for changes made to source code, but not to tests. The former is under src/, the latter under test/ .
I'm sorry to complain, as Karma is extremely useful when it works, but just to say, I have lost _many days_ over the last year when new installs of Karma have one issue or another that I cannot track down. There are so many karma-* modules that depend on whichever version that this makes it difficult to try rolling back the version. It would be nice if it didn't break so frequently. At the moment, I can work around by killing and restarting Karma every time I add/modify a test, but this is a real pain.
I'm on OS X 10.9.5.
packages.json
...
"devDependencies": {
"grunt": "^0.4.4",
"grunt-contrib-jshint": "^0.9.2",
"grunt-contrib-nodeunit": "~0.2.0",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-concat": "^0.3.0",
"grunt-qunit-amd": "^0.1.1",
"karma": "^0.12.24",
"mocha": "^2.0.1",
"karma-mocha": "^0.1.9",
"chai": "^1.9.2",
"karma-chai": "^0.1.0",
"sinon": "^1.11.1",
"karma-sinon": "^1.0.3",
"karma-requirejs": "^0.2.2",
"karma-chrome-launcher": "^0.1.5"
},
...
karma.conf.js
module.exports = function(config) {
config.set({
basePath: '../..',
frameworks: ['mocha', 'requirejs'],
client: {
mocha: {
ui: 'bdd'
}
},
files: [
// {pattern: 'libs/**/*.js', included: false},
{pattern: 'libs/pubsub/pubsub.js', included: false},
{pattern: 'src/**/*.js', included: false},
{pattern: 'test/mocha/mocha.js', included: false},
{pattern: 'test/should/should.js', included: false},
{pattern: 'test/**/*Spec.js', included: false},
'test/karma/test-main.js'
],
exclude: [
'src/main.js'
],
// test results reporter to use
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
reporters: ['progress'],
port: 9876,
colors: true,
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_WARN,
autoWatch: true,
usePolling: true,
// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera (has to be installed with `npm install karma-opera-launcher`)
// - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`)
// - PhantomJS
// - IE (only Windows; has to be installed with `npm install karma-ie-launcher`)
browsers: ['Chrome'],
// If browser does not capture in given timeout [ms], kill it
captureTimeout: 60000,
// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun: false
});
};
I discovered something to do with WebStorm today.
As of karma 0.12.25, using WebStorm 9 (safe-write=false), this ain't working, even usePolling set to true. WebStorm there's a plugin to run karma, and in this mode it doesn't work.
Running with "karma start" it works, usePolling = (false|true).
Having the same issue, on ubuntu 14.10. Using vim, tried both usePolling false and true. Even tried making a new file with cat. Still nothing getting rerun.
karma 0.12.24
EDIT: I figured it out.
In karma.conf.js my files were:
files: [
'src/{app,componets}/**/*.js'
]
Which when looking at watch logs came up as this:
DEBUG [watcher]: Watching "/home/jerry/code/blah/src/{app,components}"
Switching my files to src/app/**/*.js and src/components/**/*.js fixed it.
Not sure if this is intended behaviour though
@JetFault
Switching my files to
src/app/**/*.jsandsrc/components/**/*.jsfixed it.
This! I confirm it on my side; I had patterns like:
'test/unit/{data,mocks-inlined}/*.json',
Switching it to:
'test/unit/data/*.json',
'test/unit/mocks-inlined/*.json',
makes the watcher work. So since the very beginning this issue for me had nothing to do with usePolling etc., just with the way of specifying patterns.
@vojtajina Why is this not glob-compatible? Is this intended?
@mzgol it's because we watch only directory and in watcher.js we doesn't use glob library for getting directory.
Seems we should make more robust way to define root directory.
@mzgol patterns source of your problem?
@maksimr Yes, this was my issue. I didn't even think that it may be a different pattern format issue.
So it seems this issue should be closed unless you want to add support for groups to watcher.js. Other issues, with polling etc. are different to the issue I had and reported.
@mzgol This was added in: https://github.com/karma-runner/karma/pull/1251
Fix in canary branch
If you're still having this problem, keep in mind that depending on the size of your project and the way you load your dependencies, karma might actually exceed the open files limit. See http://docs.basho.com/riak/latest/ops/tuning/open-files-limit for instructions on how to increase it. This is what worked for me.
I can confirm disabling 'safe write' in Intellij solves the problem. thx @pallogu
@maksimr mentions this is fixed in canary branch, however. I still experience the issue. Here is my workaround. Please let me know if this resolves the issue for anyone else. I've only tested this on Chrome, I'm sure similar approaches would work for the other browsers. Once you enter karma start and the browser launches, enable dev tools, check disable cache from the network tab. With the cache completely disabled, chrome no longer gets a cached version of the spec files.
Hi guys, i had the same issue yesterday and none of these solutions worked for me, but i set singleRun in karma.conf.js to true which means it will run once and exit, then i watch the files with gulp.watch and on change i run karma from there, and i prefer this solution even if there is no problem with karma, because we have to check for UT while development too in one console.
`
var Server = require('karma').Server;
gulp.task('karma', function (done) {
new Server({
configFile: __dirname + '/karma.conf.js'
}, done).start();
});
gulp.task('watch', function () {
gulp.watch(['./client//.js', './client//.html'], ['inject', 'reload', 'karma']);
});
`
Although this is RE: intellij.
Adding the following line to /etc/sysctl.conf
fs.inotify.max_user_watches = 524288
Then
sudo sysctl -p --system
fixed it on my linux box
https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit
Hello all! I was searching why karma doesnt reload when file is changed. Now after 3-5 days of deep research i finally found a reason for this.
It's not autoWatch, nor usePolling, nor singleRun, nor atomic_save for me.
It's _glob characters in the _full_ path to watched file_ (in my case it was like C:\!JS\foo\bar.js, notice '!' in the beggining of JS). Reason for this here (https://github.com/paulmillr/chokidar/issues/300 (issue from chokidar, which karma has in dependencies)). So consider to check names of your current working directory and files for '!', '*', '[', '{' and etc.
Hope it helps to save a lot of time for someone because i would be really glad to find my message in the past.
p.s. I decided to write message exactly here because it was the most common page which i was landing during my research :)
Most helpful comment
Hello all! I was searching why karma doesnt reload when file is changed. Now after 3-5 days of deep research i finally found a reason for this.
It's not
autoWatch, norusePolling, norsingleRun, noratomic_savefor me.It's _glob characters in the _full_ path to watched file_ (in my case it was like C:\!JS\foo\bar.js, notice '!' in the beggining of JS). Reason for this here (https://github.com/paulmillr/chokidar/issues/300 (issue from chokidar, which karma has in dependencies)). So consider to check names of your current working directory and files for '!', '*', '[', '{' and etc.
Hope it helps to save a lot of time for someone because i would be really glad to find my message in the past.
p.s. I decided to write message exactly here because it was the most common page which i was landing during my research :)