Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

angular karma runner hangs indefinitely

Windows 8 64bit

Node.js 0.10.5 64bit

Karma 0.8.5

I am able to start karma server, Chrome browser opens (I have it defined as default browser in karma config). The issue comes when I am doing 'karma run'. Chrome changes the tab status to Chrome 26.0 (Windows) is executing. But that is all, no output on the console, no nothing. it can stay like that for hours.

Any ideas?

EDIT

I have the follwoing gists: karma.conf.js and main.js (used for loading the test scripts). I am starting the server with LOG_DEBUG and I can see that all script files are loaded. Gist url: https://gist.github.com/mihaihuluta/5490991

like image 608
Mihai H Avatar asked Apr 30 '13 15:04

Mihai H


1 Answers

I personally found that if you have require.js...

frameworks: ['jasmine', 'requirejs'],

...when you don't need it, things will just lock up at "executing..." in all browsers.

Also make sure you've specifed your adapters, eg.

files: [
    //adapter
    JASMINE, 
    JASMINE_ADAPTER,
    //...other files...
    'test/client/*.js'
]

Finally, I use

logLevel: config.LOG_DEBUG

and

browsers: ['Chrome'] //only one

...to ensure I have the simplest test case and am getting all debug information for any failures.

like image 156
Engineer Avatar answered Nov 12 '22 20:11

Engineer