前端自动化测试解决方案探析(5)

发表于:2016-11-23来源:ouven作者:ouven点击数: 标签:前端
describe ( long asynchronous specs , function () { beforeEach ( function ( done ) { done (); }, 1000 ); it ( takes a long time , function ( done ) { setTimeout ( function () { done (); }, 9000 ); }, 1

describe("long asynchronous specs", function() {
    beforeEach(function(done) {
    done();
}, 1000);

it("takes a long time", function(done) {
    setTimeout(function() {
        done();
    }, 9000);
}, 10000);

afterEach(function(done) {
    done();
    }, 1000);
});

https://jasmine.github.io/2.5/introduction

    原文转自:http://jixianqianduan.com/frontend-javascript/2016/11/22/front-end-auto-test.html