Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: You need to include some adapter that implements __karma__.start method

I'm trying to add some unit tests to one of my projects.

So far I've installed and configured karma, and have installed jasmine. I've one test file in my test/ folder.

The karma server has started, the browser page is ready, but karma run fails as follows:

$ karma run karma-conf.js 
[2014-06-14 15:19:11.046] [DEBUG] config - Loading config /foo/test/karma-conf.js
Waiting for previous execution...
Chrome 35.0.1916 (Linux) ERROR
  You need to include some adapter that implements __karma__.start method!

This error message doesn't Google well.

Is this something obvious, or do I need to provide more information?

like image 664
Drew Noakes Avatar asked Jun 14 '14 14:06

Drew Noakes


3 Answers

It does seem like this is a very general error, however in my case the problem was either that I didn't run karma start from the correct folder, or that I didn't restart it after changing the configuration.

I'll leave this question open and hopefully it can become a resource for others who experience this error message.

like image 81
Drew Noakes Avatar answered Oct 17 '22 22:10

Drew Noakes


If you name your karma config file karma.conf.js, you can simply type karma start.

Otherwise specify the filename karma start karmafile.js

(I was in the right directory, but was not specifying a file name.)

like image 33
James Lawruk Avatar answered Oct 17 '22 23:10

James Lawruk


You need to run your karma run or whatever function in the folder where karma-conf.js is in.

like image 13
AndyX Avatar answered Oct 17 '22 22:10

AndyX