• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 前端自動化測試解決方案探析(4)

    發表于:2016-11-23來源:ouven作者:ouven點擊數: 標簽:前端
    http://mochajs.org/ jasmine。 jasmine是一個BTT的框架,不依賴其它框架。測試集以函數describe(string, function)封裝;測試用例,以it(string, function)函數封裝,它也包含

    http://mochajs.org/

    • jasmine。

      jasmine是一個BTT的框架,不依賴其它框架。測試集以函數describe(string, function)封裝;測試用例,以it(string, function)函數封裝,它也包含2個參數;斷言,以expect語句表示,返回true或false;斷言的比較操作時,將Expectation傳入的實際值和Matcher傳入的期望值比較,另外任何Matcher都能通過在expect調用Matcher前加上not來實現一個否定的斷言(expect(a).not().toBe(false);)

    describe("A suite is just a function", function() {
        var a;
        it("and so is a spec", function() {
            a = true;
    
            expect(a).toBe(true);
            expect(a).not().toBe(false);
        });
    });
    

      jasmine也支持異步測試用例。

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

    ...

    熱門標簽

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>