Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No longer able to use ddescribe or iit

I used to be able to use ddescribe and iit to have jasmine/karma run just a specific test or set of tests. However, now it no longer works, and I get this error: (or a similar one for iit).

INFO [karma]: Karma v0.12.31 server started at http://localhost:8081/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9.8 (Windows 7)]: Connected on socket jIMgciNEN5VXBdZOhDz2 with id 78471739
PhantomJS 1.9.8 (Windows 7) ERROR
  ReferenceError: Can't find variable: ddescribe
  at /.../test.js:146

I am running: karma 0.12.28, jasmine 2.2.0, karma-jasmine: 0.3.5, karma-phantomjs-launcher: 0.1.4

Here is what the test file basically looks like:

'use strict';

ddescribe('MyController', function() {
    it('should do xyz', function() {
       ...
    });
});

Any ideas at all? Is there some definition or configuration change that I have missed so that now ddescribe is no longer defined?

like image 483
DavidA Avatar asked Feb 09 '15 18:02

DavidA


1 Answers

Ok, I finally found the bug report: https://github.com/karma-runner/karma-jasmine/issues/73

Apparently they have changed from using ddescribe and iit to using fdescribe and fit for 'focused' testing.

like image 134
DavidA Avatar answered Nov 18 '22 18:11

DavidA