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

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

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

    發表于:2016-09-22來源:segmentfault作者:acrens點擊數: 標簽:前端
    () { var result = []; result.push( typeof null ); result.push( null instanceof Object ); return result;} /** - 檢測操作符優先級 - @return {[string]} [返回字符串] */ function checkOperator
    () { var result = []; result.push(typeof null); result.push(null instanceof Object); return result; } /** - 檢測操作符優先級 - @return {[string]} [返回字符串] */ function checkOperators() { var result = 'autoTest'; result = 'Value is ' + (result === 'autoTest') ? 'Something' : 'Nothing'; return result; }
    • fqa.spec.js 測試代碼

    /**
     - test index.js checkMap method
     - detail:
     -     parseInt(val, base), base is 2 ~ 36, otherwise value equal NaN.
     */
    describe('test map and callback parseInt', function() {
        
        it('a array call map', function() {
            var nums = checkMap();
            console.log(nums);
    
            expect([1, NaN, NaN]).toEqual(nums);
        });
    });
    
    /**
     - test index.js typeofAndInstanceOf method
     - detail:
     -     typeof null qeual 'object', but null instanceof Object equal false, because null Constructor not Object.
     */
    describe('test null is object', function 
    
    
    
               

    原文轉自: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>