Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Vue.js 單元測試 -Jest
Search
CypressKuo
April 28, 2017
Technology
0
190
Vue.js 單元測試 -Jest
Vue.js 單元測試 with Jest
CypressKuo
April 28, 2017
Tweet
Share
More Decks by CypressKuo
See All by CypressKuo
Deep-copying.pdf
cypresskuo
0
28
CSS_for_Web_Vitals.pdf
cypresskuo
0
35
談談_Code_review.pdf
cypresskuo
0
42
REST_vs_GraphQL_今夜はご注文はどっち.pdf
cypresskuo
0
21
CSS_重構.pdf
cypresskuo
0
22
跟上_JS_的腳步-ES2020.pdf
cypresskuo
0
25
Core_Web_Vitals.pdf
cypresskuo
0
51
這個時代人人都知道的敏捷開發.pdf
cypresskuo
0
55
Webassembly.pdf
cypresskuo
0
11
Other Decks in Technology
See All in Technology
Language Update: Java
skrb
2
230
異業種出身エンジニアが気づいた、転向して十数年経っても変わらない自分の武器とは
macnekoayu
0
270
おやつは300円まで!の最適化を模索してみた
techtekt
PRO
0
260
クラウドセキュリティを支える技術と運用の最前線 / Cutting-edge Technologies and Operations Supporting Cloud Security
yuj1osm
2
260
2025年になってもまだMySQLが好き
yoku0825
8
3.4k
攻撃と防御で実践するプロダクトセキュリティ演習~導入パート~
recruitengineers
PRO
4
1.8k
Flutterでキャッチしないエラーはどこに行く
taiju59
0
210
Obsidian応用活用術
onikun94
0
220
実践アプリケーション設計 ①データモデルとドメインモデル
recruitengineers
PRO
5
1.5k
実践データベース設計 ①データベース設計概論
recruitengineers
PRO
4
2k
Kubernetes における cgroup v2 でのOut-Of-Memory 問題の解決
pfn
PRO
0
450
allow_retry と Arel.sql / allow_retry and Arel.sql
euglena1215
1
150
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
40
2k
Code Reviewing Like a Champion
maltzj
525
40k
Navigating Team Friction
lara
189
15k
Site-Speed That Sticks
csswizardry
10
810
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
111
20k
Balancing Empowerment & Direction
lara
3
610
Designing for humans not robots
tammielis
253
25k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
Bash Introduction
62gerente
614
210k
Rails Girls Zürich Keynote
gr2m
95
14k
Transcript
Vue.js 單元測試 -Jest 2017/04/28 @前端組例會 cypresskuo
Jest Painless JavaScript Testing - Easy Setup - Instant Feedback
- Snapshot Testing - Zero configuration testing platform - Facebook 開源專案 2
Easy Setup Zero configuration testing platform 3
Instant Feedback --watch --watchAll 4
Snapshot Testing 將 React trees 或是其他可序列化的 UI 截取下來, 防止無意間修改到組件的某個部份。 -
server side render 5
6
其他功能 DOM Testing (需要其他元件 TestUtil) Mock Function 覆蓋率報告 --coverage http://stackoverflow.com/questions/26618243/how-do-i-read-an-istanbul-coverage-report
7
參考資料 http://facebook.github.io/jest/ https://vuejs.org/v2/guide/unit-testing.html http://laichuanfeng.com/work/jest-snapshot-and-dom-testing-in-react/ https://hackernoon.com/jest-for-all-episode-1-vue-js-d616bccbe186 8
感謝聆聽 9