## 4.1?[Jest](http://facebook.github.io/jest/)
總的來說,jest 的測試理念解決了非常多的前端測試的棘手問題,我做過一個關于 jest 的 session, 文章在?[這里](https://gistdeck.github.com/jcouyang/34686f695cd28309759e)。 文章可能寫得有點早,非常知道高興的是終于支持[最新的 nodejs 了](https://github.com/facebook/jest/blob/master/package.json#L34),而且 重要的是 facebook 使用 jest 測試 react,有一些非常方便的 mock component 的方法。
recap 一下主要是
* automock/ manual mock
* jsdom
* 并行測試
## 4.2?jasmine
jasmine 只是一個引擎,jest 也是用 jasmine 作為引擎。但是如果由于某種原因你不想用 jest 的話,可能你需要花更多的 effort 在:
* mock (rewire.js)
* runner (karma)
* headless browser for ci(phantomjs)
所以并不推薦花這么大 effort 去撘一個 jasmine 的測試環境,關鍵還會有一系列的問題
* phantomjs 怪怪的 issue
* karma 復雜的配置
* rewire 也有一些坑
## 4.3?mocha
沒試過用來測 React,不過 mocha 比 jasmine 好的一點是本身就可以跑在 node 上,使用 sinon(mock) 和 should.js(assert) 是個非常強大的一套測試工具。
- 1. Why not 2 way binding/為毛不用雙向綁定
- 2. What's Virtual DOM, why should we care / 為毛要用 Vitual Dom
- 3. Why Immutable / 為毛要不可變
- 4. How to do Unit test React project / 如何單元測試
- 5. Modular and Components
- 6. How should I thinking in react way / 如何以 React 的方式解決問題
- 7. What about Data Fetching / 只有 V 的話,數據 M 呢
- 8. What about Router / router 怎么辦
- 9. How to communicate between two components that don't have a parent-child relationship/ 不是父子關系的 component 怎么交互
- 10. When should I use "key" / 什么時候該用 key
- 11. What's these Warnings / 這些黃黃的是神馬
- 12. How to Profile Component Perfomance / 如何提升效率