Getting requirejs to work with Jasmine

后端 未结 5 1489
半阙折子戏
半阙折子戏 2020-12-04 06:52

I first want to say that I am new to RequireJS and even newer to Jasmine.

I am having some issues with the SpecRunner and require JS. I have been following the tut

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 07:45

    you can use done in combo with before filters to test asynchronous callbacks:

      beforeEach(function(done) {
        return require(['dist/sem-campaign'], function(campaign) {
          module = campaign;
          return done();
        });
      });
    

提交回复
热议问题