How do I focus on one spec in jasmine.js?

前端 未结 9 1920
借酒劲吻你
借酒劲吻你 2020-11-29 23:41

I have a bunch of failing specs from a rather large architectural change. I\'d like to work on fixing them one by one by tagging each one with \'focus\'.

Does jasmin

9条回答
  •  感动是毒
    2020-11-29 23:56

    You can create your all your specs up front but disable them with xdescribe and xit until you're ready to test them.

    describe('BuckRogers', function () {
      it('shoots aliens', function () {
        // this will be tested
      });
    
      xit('rescues women', function () {
        // this won't
      });
    });
    
    // this whole function will be ignored
    xdescribe('Alien', function () {
      it('dies when shot', function () {
      });
    });
    

提交回复
热议问题