When using Jasmine through Karma, there are several letters that help a lot
- Add x in front of describe or it to skip the suite or test
- Add d in front of describe to only run this particular suite
- Add i in front of it to only run this particular unit test
d and i are additions by the Karma dev team. They have a pending pull request, but Jasmine team has not merged it yet.
There is also helpDescribe that I wrote that helps with info messages if you use lazy-assertions
If you use Mocha testing framework, you can use
built-in describe.only
, it.only
and their opposites describe.skip
, it.skip
.
Update 1
Jasmine 2.x added fdescribe
and fit
to focus on a single suite or spec, replacing ddescribe
and iit
.