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

前端 未结 9 1912
借酒劲吻你
借酒劲吻你 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-30 00:08

    You can run a single spec by using the url for the spec

    describe("MySpec", function() { 
      it('function 1', function() { 
        //... 
      }) 
    
      it('function 2', function() { 
        //... 
      } 
    
    }) 
    

    Now you can run just the whole spec by this url http://localhost:8888?spec=MySpec and a the first test with http://localhost:8888?spec=MySpec+function+1

提交回复
热议问题