前端自動化測試解決方案探析(3)

發表于:2016-11-23來源:ouven作者:ouven點擊數: 標簽:前端
輸出為: $ ./node_modules/mocha/bin/mocha Array #indexOf() ? should return -1 when the value is not present 1 passing (9ms) 同時,mocha支持異步和Promise。 describe ( #find() , function ()

  輸出為:

$ ./node_modules/mocha/bin/mocha

  Array
    #indexOf()
      ? should return -1 when the value is not present


  1 passing (9ms)

  同時,mocha支持異步和Promise。

describe('#find()', function() {
    it('respond with matching records', function(done) {
        db.find({type: 'User'}, function(err, res) {
            if (err) return done(err);
            res.should.have.length(3);
            done();
            });
        });
    });
});

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

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97