-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Did not manage to run jasmine tests #888
Comments
I removed the requirejs from the frameworks in the config, now it works. Something is wrong with that plugin... |
Okay, to summarize, I got plugin auto install problems, I had to install the plugins manually, and I got requirejs configuration problems, but the error messages about that were very confusing. Maybe you could add better error messages, because it is not easy to debug such cases. Hmm maybe there is a possible nodejs memory leak too, it is on the second image... |
@Inf3rno sorry to hear it was tough to get Karma running... If it didn't install the plugins, that means you probably have an older version of NPM, which does not support peerDependencies. We are gonna remove this anyway. You can however use Why did you install Karma globally (Just curious if there is any out-dated docs, because the recommended way is to install Karma locally, per project)? When using RequireJS, you need to actually start Karma (call The port already in use means there is another instance of Karma running. Opening FF - again, sounds like a IntelliJ issue. cc @segrey |
I don't think that the problem is with karma. I mean you have done a great job, karma is very handy if you know how to use it. I think it's much better than the JSTD I used.
I have git 1.7.7.1 (latest 1.8.5.3), node 0.8.10 (latest 0.10.24), npm 1.1.62 (latest 1.3.24). I guess I should update them all... Thanks the recommendation! :-)
I read here that I should install karma this way. Currently I have only a single karma dependent project, so it does not really matter which project has which version of karma...
Yepp this is well documented in the karma-requirejs plugin. I think you should link these plugins in the readme file. If npm does not install automatically the plugins, it would be more obvious which plugin should we use in which circumstances. If npm installs the plugins automatically, we still have to find the documentation of each plugin we use, and that is easier if there is a link for all of them in the main readme file. For example by firefox we have to use karma-firefox, by requirejs we have to use karma-requirejs, etc... So I think the documentation of karma and each karma plugin is good from a standalone aspect, but there is not enough "glue" between them, at least not in the main readme file..
Ye I think it was. It happens by misconfiguration only, so it does not cause any problem when karma is well configured... From the other issue:
Ye I understand now completely. Karma generates a html file from the karma config file, and use the files with Another issue is the inverse logic of the order of the file patterns. In programming about 99% of the cases the second pattern overrides the first, so the "First pattern matching a file wins." is very unusual (not just me). Is there a serious reason for this approach?
Should I send a pull request or is there an easier way to do that? |
Hi guys, Sorry for the delay. Please see my answers below. My environment: Tested on a sample project with intentionally misconfigured karma-requirejs: https://github.com/segrey/karma-demo
I can only reproduce this issue if I force quite PhpStorm (in Linux: If you're experience that issue without killing PhpStorm instance, please provide your steps to reproduce the problem.
Couldn't reproduce. It'd be appreciated, if you could provide reproducible steps.
Couldn't reproduce. Please help.
Caused by misconfiguration.
Will be fixed in PhpStorm 8.
That's output of Karma Server itself. |
Hmm I think it can dependent on the operation system, I used windows 7... I cannot remember what was wrong in the config files, it was 2 weeks ago. I don't think I have commits about that, I usually don't commit buggy code... :S
I simply replaced "Firefox" with "Chrome" in the karma.config. I did not have the chrome launcher installed... Got the message, "waiting for browser" now in phpstorm, but I managed to open a firefox window with this settings 2 weeks ago...
You should turn off Obviously I did not know what I am doing by that configuration .. :D |
Yes, that's expected. It opens a new browser window on Karma server startup. |
Maybe we could close this issue and file issues related to IntelliJ Karma integeration in the http://youtrack.jetbrains.com/issues/WEB#newissue=yes (subsystem: Unit Tests). |
Okay, I close it. |
@Inf3rno I'm updating the readme. It's pretty out-dated (#905). Regards updating the docs - yep pull request is the best (the source is here https://github.com/karma-runner/karma/tree/master/docs). |
I think I can write a few lines to the readme.md which can help to understand the basic concept behind karma, but first I read the whole documentation. I do it tomorrow... I think writing the text here or to #905 would be better, I don't want to update the whole documentation, just add one or two sections to the main readme file. The rest is yours... |
i was having the same problem it was basically removing requirejs from the list of frameworks or you should put this file main-test.js (http://karma-runner.github.io/0.8/plus/RequireJS.html) requirejs.config({
}); |
I intended to run jasmine test on win7, phpstorm7, phpstorm karma plugin. I found multiple problems...
I installed karma from git bash:
npm install -g karma
Despite the statements in the documentation it did not install the karma-* plugins, so I had to install them manually:
npm install -g karma-jasmine
npm install -g karma-requirejs
...
After that I generated a test file with karma:
I tried to run (ofc I installed the plugins after found out by run that they are not installed), but I got the following phenomenons:
I don't know what happens in the background, but the test obviously does not run. :S
(The code uses core js only, it does not require browser specific tests, so I'll change to jasmine-node instead of this.)
The text was updated successfully, but these errors were encountered: