欧美三区_成人在线免费观看视频_欧美极品少妇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在线观看 | 日韩亚洲一区二区三区 | 91青青操| 看片亚洲 | 成人久久网 | 亚洲一区二区三区高清 | 日夜夜操 | 久久精品国产精品亚洲综合 | 亚洲av毛片成人精品 | 男女视频在线观看免费 | 久久久精品一区二区三区 | 一区二区三区在线 | 网站 | 91xxx在线观看 | 国产福利视频一区 | 免费国产黄频在线观看视频 | 国产精品成人第一区 | 天天干妹子 | 黄色在线播 | 毛片免费看电影 | 亚洲久草 | 精品视频在线观看 | 精品久久久久久久久久久久久久久 | 欧美精品在线观看 | 在线播放国产一区二区三区 | 一区二区av | 亚洲色综合图区p | 国产精品视频福利 | 中文字幕av一区二区 | 91精品国产综合久久久动漫日韩 | 久久婷婷色 | 亚洲欧洲精品视频在线观看 | 亚洲免费在线视频 | 色狠狠色狠狠综合天天 | 九九九九九九精品任你躁 | 亚洲人影院| 亚洲精品一区二区三区婷婷月色 | 日韩精品一区二区三区中文字幕 |