[0.10.4] - Karma renaming files + Executed 0 of 0 ERROR

1,190 views
Skip to first unread message

edmond...@gmail.com

unread,
Nov 1, 2013, 4:26:21 AM11/1/13
to karma...@googlegroups.com
Dear all,

I am trying to run a simple karma test session with Grunt.

I have two key problems: 

 - Some files with strange names are served, so it becomes really complicated for me to understand what are they...

- Second, I get an Error even if no tests are run:

Chrome 30.0.1599 (Windows 7) ERROR
        Script error.
Chrome 30.0.1599 (Windows 7): Executed 0 of 0 ERROR (0 secs / 0 secs)
Chrome 30.0.1599 (Windows 7): Executed 0 of 0 ERROR (1.348 secs / 0 secs)



DEBUG [web-server]: serving: G:\GottwareWeb\tools\historical\admin\node_modules\karma\static/client.html
DEBUG [web-server]: serving: G:\GottwareWeb\tools\historical\admin\node_modules\karma\static/karma.js
DEBUG [karma]: A browser has connected on socket KJxqDePenppo5RQEtxsG
INFO [Chrome 30.0.1599 (Windows 7)]: Connected on socket KJxqDePenppo5RQEtxsG
DEBUG [karma]: All browsers are ready, executing
DEBUG [web-server]: serving: G:\GottwareWeb\tools\historical\admin\node_modules\karma\static/context.html
DEBUG [web-server]: serving: G:/GottwareWeb/tools/historical/admin/node_modules/karma-jasmine/lib/jasmine.js
DEBUG [web-server]: serving: G:/GottwareWeb/tools/historical/admin/node_modules/karma-jasmine/lib/adapter.js
DEBUG [web-server]: serving: G:/GottwareWeb/tools/historical/admin/bower_components/angular/angular.js
DEBUG [web-server]: serving: G:/GottwareWeb/tools/historical/admin/bower_components/angular-mocks/angular-mocks.js
DEBUG [web-server]: serving: G:/GottwareWeb/tools/historical/admin/bower_components/angular-resource/angular-resource.
DEBUG [web-server]: serving: G:/GottwareWeb/tools/historical/admin/bower_components/angular-cookies/angular-cookies.js
DEBUG [web-server]: serving: G:/GottwareWeb/tools/historical/admin/bower_components/angular-sanitize/angular-sanitize.
DEBUG [web-server]: serving: G:/GottwareWeb/tools/historical/admin/public/javascripts/ui-bootstrap-tpls-0.3.0.js
DEBUG [web-server]: serving: C:\Users\porcu\AppData\Local\Temp/1abfef5d36ed1f9f45996c35f96974f69417681a.js
DEBUG [web-server]: serving: C:\Users\porcu\AppData\Local\Temp/19639e11007639e09379d754ea47708615806d0e.js
DEBUG [web-server]: serving: C:\Users\porcu\AppData\Local\Temp/0538ce6210e7ff9d558e4800f1523c1a77983eeb.js
DEBUG [web-server]: serving: C:\Users\porcu\AppData\Local\Temp/5830cad098d3a3dfa90cc71adc030368aa5e3fa4.js
DEBUG [web-server]: serving: C:\Users\porcu\AppData\Local\Temp/34a8aa3e94f1f56c16356cb65bd4e7d52f8daa66.js
DEBUG [web-server]: serving: C:\Users\porcu\AppData\Local\Temp/1d4b759c5ddc565fb0139373fa7aa131af113eab.js
DEBUG [web-server]: serving: C:\Users\porcu\AppData\Local\Temp/0f2c1424d4a7f3f30c7ab3bb1dd79afdae5c424a.js
DEBUG [web-server]: serving: C:\Users\porcu\AppData\Local\Temp/c2013b7ebf3bacf9b05deccd067aa4fdfdefbfe6.js
Chrome 30.0.1599 (Windows 7) ERROR
        Script error.
Chrome 30.0.1599 (Windows 7): Executed 0 of 0 ERROR (0 secs / 0 secs)
Chrome 30.0.1599 (Windows 7): Executed 0 of 0 ERROR (1.348 secs / 0 secs)
DEBUG [launcher]: Disconnecting all browsers
DEBUG [launcher]: Killing Chrome
DEBUG [launcher]: Process Chrome exitted with code 0
DEBUG [launcher]: Cleaning temp dir C:\Users\porcu\AppData\Local\Temp\karma-1853243
Warning: Task "karma:unit" failed. Use --force to continue.

I am using Karma 0.10.4 and my karma.conf.js looks like the following:

// Karma configuration
module.exports = function(config) {
config.set({

frameworks: ["jasmine"],

// base path, that will be used to resolve files and exclude
basePath : '',

// list of files / patterns to load in the browser
files : [
   // makes sense to refer to bower_components from here,
   // this is what an empty scaffolded yeoman angular app does
  'bower_components/angular/angular.js',
  'bower_components/angular-mocks/angular-mocks.js',
  'bower_components/angular-resource/angular-resource.js',
  'bower_components/angular-cookies/angular-cookies.js',
  'bower_components/angular-sanitize/angular-sanitize.js',
  'public/javascripts/ui-bootstrap-tpls-0.3.0.js',
  'app/javascripts/*.coffee',
  'app/javascripts/**/*.coffee',
  'test/javascripts/*.coffee',
  'test/javascripts/**/*.coffee'

],

// list of files to exclude
exclude : [],

// test results reporter to use
// possible values: dots || progress || growl
reporters : ['progress'],

// web server port
port : 8080,

// cli runner port
runnerPort : 9100,

// enable / disable colors in the output (reporters and logs)
colors : true,

// level of logging
// possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG
logLevel : config.LOG_DEBUG,

// enable / disable watching file and executing tests whenever any file changes
autoWatch : true,

// Start these browsers, currently available:
// - Chrome
// - ChromeCanary
// - Firefox
// - Opera
// - Safari (only Mac)
// - PhantomJS
// - IE (only Windows)

browsers : ['Chrome'],

// If browser does not capture in given timeout [ms], kill it
captureTimeout : 5000,

// Continuous Integration mode
// if true, it capture browsers, run tests and exit
singleRun : false,

});
};

Please help me.

Thanks

Edmondo


Daniel Tabuenca

unread,
Nov 3, 2013, 11:02:47 PM11/3/13
to karma...@googlegroups.com, edmond...@gmail.com
It looks like there is just a javascript error in one of the scripts you are loading. Hit debug button and chrome and open up your dev tools. Look in the console and you should be able tot tell what is going on. As far as the weirdly named temp files, that's normal with some karma extensions, maybe it's from the *.cofee files? I don't think that's the cause of your problems though..

Edmondo Porcu

unread,
Nov 4, 2013, 5:35:02 AM11/4/13
to Daniel Tabuenca, karma...@googlegroups.com
Hello Daniel,

thank for your support.

I have found out the problem and wrote a small CoderWall post about it



Best

Edmondo


2013/11/4 Daniel Tabuenca <dtab...@gmail.com>

Vojta Jína

unread,
Nov 4, 2013, 8:43:42 PM11/4/13
to karma...@googlegroups.com
Edmondo, I'm not sure where is your error coming from, because Karma just forwards the error from the browser. In your example you had "no module found" error. See the output that I get when I try it:
Chrome 30.0.1599 (Mac OS X 10.9.0) tabs should change active pane when title clicked FAILED
Error: No module: fff
   at Error (<anonymous>)
   at /Users/vojta/Code/ng-directive-testing/lib/angular.js:1058:17
   at ensure (/Users/vojta/Code/ng-directive-testing/lib/angular.js:999:38)
   at module (/Users/vojta/Code/ng-directive-testing/lib/angular.js:1056:14)
   at /Users/vojta/Code/ng-directive-testing/lib/angular.js:2699:24
   at Array.forEach (native)
   at forEach (/Users/vojta/Code/ng-directive-testing/lib/angular.js:110:11)
   at loadModules (/Users/vojta/Code/ng-directive-testing/lib/angular.js:2695:5)
   at /Users/vojta/Code/ng-directive-testing/lib/angular.js:2700:38
   at Array.forEach (native)
TypeError: Cannot call method 'find' of undefined
   at null.<anonymous> (/Users/vojta/Code/ng-directive-testing/test/tabsSpec.js:73:22)

I agree, that's wrong if you just get "Script error", but I'm not sure why was that happening for you. Maybe Chrome on Windows behaves differently. Or are you using some custom script loader?

V.


--
You received this message because you are subscribed to the Google Groups "karma-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to karma-users...@googlegroups.com.
To post to this group, send email to karma...@googlegroups.com.
Visit this group at http://groups.google.com/group/karma-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/karma-users/CAM-vFRw%2BJNYmBK9wq2ni842KPQWRn7rWcfHvfT4avDU8WjmiQA%40mail.gmail.com.

For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages