欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

Discover a powerful and suitable Javascript

系統 4046 0
?

Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome , Safari or Firefox browser.

Discover a powerful and suitable

Javascript Automatic Testing Toolkit

by Daniel Yang

Purpose

Find out the best Javascript testing library for us.

QUnit vs Jasmine

  • support in brower & Node.js
  • testing of DOM manipulation
  • TDD or BDD

BDD or TDD

in Jasemine

expect(5).toEqual(5);

expect(5).not.toEqual(5);

in Qunit

strictEqual(5, 5);

notStrictEqual(5, 5);

But we need something more...

  • how to test in different browers
  • how to test with a AMD loader
  • and how to automatic testing

JsTestDriver + Jasmine

This is the Taobao's solutions in used, but it has some bugs which make people get fighting mad.

Pro

  • testing in different browers
  • automatic testing
  • BDD style script

Con

  • asynchronous support is not good, and you shall mock up the data when using AJAX.
  • couldn't support all Jasmine method
  • and it built in Java(not JS)

Is there any libaray
can solve these problems?

My answer is Buster.js

Easy to deploy

use npm to install & manager

npm install -g buster

npm install buster-amd

Browser Testing

Buster.JS can automate browsers, JsTestDriver style.

buster server

Buster.JS also has a static browser runner that runs tests by opening a web page in a browser. This is similar to QUnit, Mocha, etc.

buster static

AJAX Testing

using Sinon.JS to mock out the entire XHR stack in a browser, so we can test AJAX easily.

Asynchronous tests

To tag a test as async, have the test function take one argument, done.

The done argument is a function. Call it to tell Buster.JS that the asynchronous test has finished running.

Test reporters

Buster.JS can create all human-consumable reports(by Terminal, JSON, XML and HTML).

Buster Test Reporters Doc

Buster.JS is still beta, so it has some rough edges.

But I think this solutions will satisfy our needs.

Thanks for your watching!

?

Discover a powerful and suitable Javascript Automatic Testing Toolkit


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 亚洲综合区 | 欧美成人精品一区二区男人看 | 国产亚洲蜜芽精品久久 | 亚洲国产精品久久久久网站 | 欧美日韩中文 | 色婷婷视频 | A片扒开双腿进入做视频 | www.82gan.com | 欧美笫一页 | 亚洲精品一区二区三区在线观看 | 成人一区二区三区四区 | 国产精品国产三级国产专区5o | 午夜亚洲 | 欧美精品黄页免费高清在线 | 国产视频在 | 成年人黄色毛片 | 婷婷综合缴情亚洲五月伊 | 99re6热只有精品免费观看 | 久久99免费观看 | 亚洲国产中文字幕 | 欧美日韩精品一区二区在线播放 | 国产成人18黄禁网站免费观看 | 日韩精品免费在线视频 | 欧美性一区二区三区 | 日韩欧美一区二区三区免费观看 | 国产人A片777777久久 | 男女激情视频在线观看 | 色本道 | 亚洲一区二区视频 | 91热久久免费频精品黑人99 | 91亚洲精品一区二区福利 | 91视频观看 | 欧美日韩精品一区二区三区 | 国产激情网站 | 欧美一级二级三级 | 99最新地址| 国产成人高清视频免费播放 | 国内精品一区二区 | 精品国产一区二区三区成人 | 国产主播在线看 | 性夜黄a爽影免费看 |