So here's my issue. I'm trying to run a test suite for an old application of mine. However, I've stumbled upon the notorious Karma error: Executed 0 of 0 ERROR
.
As I turn Karma's loglevel to debug, I realize that these lines are being printed:
DEBUG [web-server]: serving: /home/**/**/**/node_modules/karma/static/context.html
DEBUG [web-server]: serving (cached): /home/**/**/**/node_modules/jasmine-core/lib/jasmine-core/jasmine.js
DEBUG [web-server]: serving (cached): /home/**/**/**/node_modules/karma-jasmine/lib/boot.js
DEBUG [web-server]: serving (cached): /home/**/**/**/node_modules/karma-jasmine/lib/adapter.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/jquery/dist/jquery.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular/angular.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-i18n/angular-locale_es-ar.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-animate/angular-animate.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-resource/angular-resource.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-cookies/angular-cookies.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-sanitize/angular-sanitize.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-ui-utils/ui-utils.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-ui-select/dist/select.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-hateoas/src/angular-hateoas.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/ng-table/dist/ng-table.min.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-notify-toaster/toaster.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-ui-router/release/angular-ui-router.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-strap/dist/angular-strap.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-strap/dist/angular-strap.tpl.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/sockjs/sockjs.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/stomp-websocket/lib/stomp.min.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/http-cas/src/http-cas.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/lodash/lodash.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/moment/moment.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/moment/locale/es.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-bootstrap/ui-bootstrap-tpls.js
DEBUG [web-server]: serving (cached): /home/**/**/**/bower_components/angular-moment/angular-moment.js
DEBUG [web-server]: serving (cached): /home/**/**/**/src/app/scripts/app.js
As you can tell, there are no specs. I try to add a spec file to the files
array inside karma.conf.js
, but to no avail. The same files are printed.
I'm assuming my problem is related with said caching.
Any help will be deeply appreciated.
All the best,
Alejandro
4 years late, but according to the karma file definition you can set the nocache-attribute to true
.
In case your file-definition in the karma.conf.js looks like this:
files: ['src/app/scripts/app.js']
you should change it to
files: [pattern: 'src/app/scripts/app.js', nocache: true]
This will stop serving the files from cache.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With