Declare “pending” specs/tests in jasmine or mocha

You can declare disabled functions in both mocha and jasmine using xit (instead of it), and xdescribe (instead of describe).

If you want the tests to appear as pending, in mocha you can just leave the second parameter blank in the call to the it() function. For example:

describe('Something', function () {
    it('Should be pending')
    xit('Should be disabled, i.e not appear on the list')
});

Update: The behaviour for xit/xdescribe is might change in Mocha if this merge happens: https://github.com/visionmedia/mocha/pull/510

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)