Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find which test Karma is skipping?

Karma has started skipping a test from my Jasmine test suite:

Chrome 45.0.2454 (Windows 7 0.0.0): Executed 74 of 75 (skipped 1) SUCCESS (0.163 secs / 0.138 secs)

However, I have no idea why it's doing this. I'm not trying to skip any tests. How do I find out which test is being skipped?

I've searched to see if ddescribe/iit/xit are being used, and they're not.

I'm running Karma 0.13.10 on Windows.

like image 817
TarkaDaal Avatar asked Oct 06 '15 14:10

TarkaDaal


Video Answer


2 Answers

If you use karma-spec-reporter you can specify in your karma.conf.js which outputs to suppress/show.

specReporter: {
    suppressSkipped: false
},
like image 57
Jens Bodal Avatar answered Sep 21 '22 09:09

Jens Bodal


The ddescribe and iit functions are used for focusing on specific suites/tests, not for skipping them. The xit function is used for skipping a specific test, and the xdescribe function is used for skipping suites. From the looks of what you have described, you have a suite with just one test in it that it being skipped. Search your test code for xdescribe. Choose half of your files and remove them from the config. If you still get the skip, look in that half, otherwise look in the other half. Continue splitting the list in half and removing them from the config until you have isolated the one file that has the skip in it. Then search that file. It has to be in there somewhere.

like image 35
MBielski Avatar answered Sep 24 '22 09:09

MBielski