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

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

  • <strong id="5koa6"></strong>
  • 我來教教你前端自動化單元測試如何做(8)

    發表于:2016-09-22來源:segmentfault作者:acrens點擊數: 標簽:前端
    () { it( null object , function () { var result = typeofAndInstanceOf(); console .log(result); expect([ object , false ]).toEqual(result); });}); /** - test index.js checkOperators method - detail: -
    () { it('null object', function() { var result = typeofAndInstanceOf(); console.log(result); expect(['object', false]).toEqual(result); }); }); /** - test index.js checkOperators method - detail: - compare operator precedence, + gt ?. */ describe('test null is object', function() { it('test operator preceence', function() { var result = checkOperators(); console.log(result); expect('Something').toEqual(result); }); });
  • 運行 sudo npm run test 執行測試代碼

    "scripts": {
        "test": "karma start karma.conf.js"
    }
  • 結果:

  • 解答

    1. npm run test 運行的實際上是 package.json 中配置的命令:

       
      
      
      
                 

      原文轉自:https://segmentfault.com/a/1190000006969924

    老湿亚洲永久精品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>