How can I have a beforeAll function in Jasmine ? (Not coffeeScript)

前端 未结 4 1973
半阙折子戏
半阙折子戏 2021-02-05 03:54

I need to know if there is a way to include or use a beforeAll function, or something similar, so I can login to my application and then start testing.

Right now I\'m pu

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-05 04:14

    please use below code and configure your setting in beforeAll statement.

    describe("Top", function() {
         beforeAll(function() { 
                console.log("Example 1 Setup"); 
         });
         it('xyz',function(){
            console.log('Hi!')
         });
    });
    

提交回复
热议问题