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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
CypressKuo
April 28, 2017
Technology
200
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Vue.js 單元測試 -Jest
Vue.js 單元測試 with Jest
CypressKuo
April 28, 2017
More Decks by CypressKuo
See All by CypressKuo
Deep-copying.pdf
cypresskuo
0
41
CSS_for_Web_Vitals.pdf
cypresskuo
0
46
談談_Code_review.pdf
cypresskuo
0
52
REST_vs_GraphQL_今夜はご注文はどっち.pdf
cypresskuo
0
27
CSS_重構.pdf
cypresskuo
0
30
跟上_JS_的腳步-ES2020.pdf
cypresskuo
0
35
Core_Web_Vitals.pdf
cypresskuo
0
62
這個時代人人都知道的敏捷開發.pdf
cypresskuo
0
65
Webassembly.pdf
cypresskuo
0
19
Other Decks in Technology
See All in Technology
Software Supply Chain Attackからクラウド環境を守るためにできること
lhazy
2
260
【CEDEC2026】専門性の高いデフォルメチームが挑んだ人材育成戦略 〜Cygames Academiaの企画から実施まで〜
cygames
PRO
0
600
カートの信頼性を担保するWireMockを使ったe2eテスト
ykagano
0
260
制約理論(ToC)入門 2026版
recruitengineers
PRO
8
2.2k
【CEDEC2026】Creative Approaches to Localizing the Dialects and Unique Speech of Umamusume: Pretty Derby Characters in English
cygames
PRO
3
16k
【CEDEC2026】『GRANBLUE FANTASY: Relink - Endless Ragnarok』のバトル制作事例 ~最高のキャラゲーを目指して~
cygames
PRO
0
290
Bill One 開発エンジニア 紹介資料
sansan33
PRO
7
19k
私がブラウザを自作したくなった理由
supurazako
1
230
SmartHR Engineering Team Deck
smarthr
1
2.1k
トヨタ⽣産⽅式(TPS)⼊⾨
recruitengineers
PRO
3
780
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.2k
20260608_Codexの可能性_ノンプログラマー向け_大城追記
doradora09
PRO
0
800
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.7k
From π to Pie charts
rasagy
0
270
Navigating Team Friction
lara
192
16k
We Are The Robots
honzajavorek
0
300
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.3k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
430
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
380
Designing Powerful Visuals for Engaging Learning
tmiket
1
490
Abbi's Birthday
coloredviolet
3
9.3k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
520
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
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