📌  相关文章
📜  错误:超时 - 异步函数未在 5000 毫秒内完成(由 jasmine.DEFAULT_TIMEOUT_INTERVAL 设置)站点:stackoverflow.com - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:20.460000             🧑  作者: Mango

代码示例1
Try setting the jasmine.DEFAULT_TIMEOUT_INTERVAL in a beforeAll, since the timeout interval is reset for each it block:

describe("testing timeout", function() {
    beforeAll(function() {
        jasmine.DEFAULT_TIMEOUT_INTERVAL = 999999;
    });

    fit('should have custom timeout', function(){
        console.log(jasmine.DEFAULT_TIMEOUT_INTERVAL); //prints 999999
    });
})