How do I change the timeout on a jasmine-node async spec

后端 未结 10 1938
生来不讨喜
生来不讨喜 2020-12-04 20:53

How can I get this test to pass without resorting to runs/waitsFor blocks?

it(\"cannot change timeout\", function(done) {

     request(\"http://localhost:30         


        
10条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 21:29

    Looks like you can now add it as the last argument for the it function:

    describe('my test', function(){
        it('works', function(done){
            somethingAsync().then(done);
        }, 10000); // changes to 10 seconds
    });
    

提交回复
热议问题