Jasmine + Karma skipping tests
Hi everyone. I am having a bit of an issue that I can not seem to figure out for the past couple of days.
I am using Node + Karma + Jasmine to do Unit tests for my Javascript project.
When i run Karma + Jasmine for the first time in webstorm all my test run fine, as of now i have 75 tests. If i run the tests again from the run window it only executes 49 of the tests and when i look at the results, some of the test files have not run. It stays that way. Some time it will not catch the changes to files as well.
I have tried a bunch of things like disabling cache and running chrome in Incognito mode but neither works. The only way I can consitantly get all tests to run is either Close webstorm and reopen it or refresh the chrome browser running karma.
Any feedback would be greatly appreciated and thanks for taking the time to read and help with this issue.
Please sign in to leave a comment.
haven't heard of such issues... Test project (or, at least, karma configuration file plus package.json) would be helpful.
More questions:
- when you change nothing in your tests/sources and just hit Rerun, do you see all your tests?
- if you change a single test file and re-run, do you see all tests from this file?
- do you have 'auto-run' enabled?
The more infor you can provide the better, as right now I have no clue what is going on
Hi Elena.
Here is some more feedback.
Bellow are my Karma and Package code:
{"name": "fdmb_html5",
"version": "1.0.0",
"description": "Testing Require.js code with Karma\r ==================================",
"main": "karma.conf.js",
"directories": {
"test": "test"
},
"dependencies": {
"generator-jasmine": "^0.2.2",
"jasmine": "^2.4.1",
"jasmine-core": "^2.4.1",
"karma": "^0.13.15",
"karma-chrome-launcher": "^0.2.2",
"karma-jasmine": "^0.3.6",
"karma-requirejs": "^0.2.2",
"requirejs": "^2.1.22"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Nestor Correa",
"license": "ISC"
}
can't recreate using same config and packages... Can you try composing a sample project that shows up the issue, if providing actual project is not an option?